I have the following code in my app (Cordova CLI 5.2).
<script>
var onDeviceReady;
onDeviceReady = function() {
alert('device ready');
document.body.style.backgroundColor = "red";
};
document.addEventListener('deviceready', onDeviceReady, false);
</script>
However I never see the alert (or background color change) on my Android after I build and install the app using PhoneGap Build. No matter what I do, I can't get this code to work.