I'm developing a mobile app using phonegap and jQuery Mobile. The app works like a charm on iOS and android 2.3 but it unfortunately not on ice cream sandwich (tested on the emulator and on a nexus s as well). Does anyone has experienced this issue?
I'm using phonegap-1.3.0
the loading code is the following:
function onBodyLoad() {
if ($.browser.webkit) {
phonegapReady = true;
}
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
//Phone Gap is ready!
phonegapReady = true;
onAllReady();
}
Also seeing the same thing happen with phonegap-1.3.0 + JQM in the android emulator. It doesn't seem like the deviceready is firing. If I call onDeviceReady() directly all is well. Currently using this hack:
function onBodyLoad() {
if( navigator.userAgent.match(/Android/i) ) {
onDeviceReady();
} else if (typeof navigator.device == "undefined"){
document.addEventListener("deviceready", onDeviceReady, false);
} else {
onDeviceReady();
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With