I have a simple PhoneGap application as fallows:
PhoneGap powered App
this code work for me
<body onload="init()"></body> function init() { document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady() { // Now safe to use the Cordova API }
happy coding.......