I have built a Native Mobile app with AC and Phonegap:Build. My app loads lists from a remote database and when the request fail my code already handles that correctly but I am trying to check the internet connection for other reasons with the sample code given.
// ok to access the internet
alert('We have internet!');
// NOT ok to access the internet
I have tried this code running on Android 2.2.x, 2.3.x, 2.4.x, 3.x and everytime with DATA off I get "We have internet!". Is something not aligned properly with AC and Phonegap:Build. I also tried using the app.navigator phonegap stuff too but I get errors about undefined, etc...
To add to my frustraion (I have other problems too):
*NavBar items stay highlighted when using PageJump (multiple tabs highlighted at once), figured I would try unhighlightwidget('NavBar') as a work-around and it doesn't work.
*Android button handlers fire with their default actions in addition to specified code when using Android 2.2.x, 2.3.x - no problems in 2.4.x, 3.x
*External URL's won't launch in the device browser when using Android 2.2.x, 2.3.x
*Would like to OVERRIDE the BACK button or kill the navigation history because I have an app with a page that has a mobilelist widget that I have coded to be re-used as a catalog/product drill down due to a drill-down widget not existing at this time. I attempted to use the BACK button event in conjunction with getting the current pagename so I could call appropriate code to reload my mobilelist widget but the default browser action of the BACK button fires just before my handler code and ends up jumping to the previous pagename that was navigated to rather than working how it should on my Android 3.x.
The varied behaviors are killing me.
If someone can tell me what to do so that I can be successful with AC and Phonegap:Build please do because I want to be successful.
I appreciate all of your help here.