Here's a little bit of Javascript code that will check the network connection in PhoneGap to make sure that the internet is available for public requests. In order to be in the app store your app must work in both online and offline modes. This simple code will satisfy those requirements.
// check to see if the network is reachable setTimeout(function() { navigator.network.isReachable("www.google.com", networkConnectionCheck, {isIpAddress:false}); }, 500); function networkConnectionCheck(reachability) { if ( reachability.remoteHostStatus == NetworkStatus.NOT_REACHABLE ) { navigator.notification.alert("You appear to be offline.", "your app name"); } };
For $9.95 Get Answers to Your PhoneGap Questions
Send me an email and explain the problem. I'll send back my step by step instructions.
Only $9.95
After, I'll be on retainer to answer your other questions. If you don't need any more help, cancel anytime.
Please hurry, only 2 slots are available.