My first jquery mobile app contains elements which needs datas from Internet sources like public Google calendars and Amazon affiliate widgets but it works only when I testi
For checking internet connection I use this function:
function checkConnection(){
var networkState = navigator.connection.type;
if(Connection.NONE==networkState)
return "No connection
";
}
For being able yo use it you have to add the network state plugin this way:
cordova plugin add cordova-plugin-network-information
Your AndoidManifest file should include this two lines: