I’m frustrated

Is app.isNativeAppOnline() broken?

First I must say that you guys are on top of things at AC and I love the setup, design, and build cycles. This might be a multi-faceted question and the only answer I'm interested in at this moment is what is wrong with app.isNativeAppOnline(). I have listed other pains for which I have not found an answer to at the bottom to let you know where I stand with my development woes at this time. And again, you guys are great but I need to make some decisions as far as development is concerned.

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.


if(app.isNativeAppOnline()){
// ok to access the internet
alert('We have internet!');
}
else {
// NOT ok to access the internet
alert('No 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.
3 people have
this problem
+1
Reply