why Phonegap on Android is firing both events (deviceready,resume) when I call navigator.app.loadUrl() ????
Im using cordova-1.5.0 on Android.
The page being called by loadUrl() has this javaScript:
<head>
<script type="text/javascript">
function onDeviceReady() {
alert('Ready');
}
function onLoad() {
alert('onLoad');
document.addEventListener("deviceready", onDeviceReady, false);
document.addEventListener("resume", onResume, false);
}
function onResume() {
alert('OnResume');
}
</script>
</head>
<body onload="onLoad();">
I tried to use href.location but that way "deviceready" is not called.
Any help?
Thanks