- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On my ajax call, I am trying to handle an error. If error status is 0 or not connected to internet, Dialog box should appear directing the user to phone setting to enable wifi or data mobile. How I could do this on andriod and IOS?
I am also looking code where in I can exit my app when I pressed back button. Thank you for any help.
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Exiting" your app is not something most platforms support. It cannot be done, programmatically, on iOS and is discouraged on Android. I recommend you allow the mobile deal with the management of your app's lifecycle and not worry about "exiting" your app. You might see this SO post regarding the Android exit feature > http://stackoverflow.com/questions/35144829/phonegap-navigator-app-exitapp-not-working <
There is a core Cordova plugin called Network Information that can help you determine the network status, I recommend you start there. Other more sophisticated methods are available. Search for the Internet for "network status Cordova application" for more help.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Exiting" your app is not something most platforms support. It cannot be done, programmatically, on iOS and is discouraged on Android. I recommend you allow the mobile deal with the management of your app's lifecycle and not worry about "exiting" your app. You might see this SO post regarding the Android exit feature > http://stackoverflow.com/questions/35144829/phonegap-navigator-app-exitapp-not-working <
There is a core Cordova plugin called Network Information that can help you determine the network status, I recommend you start there. Other more sophisticated methods are available. Search for the Internet for "network status Cordova application" for more help.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page