Community
cancel
Showing results for 
Search instead for 
Did you mean: 
xkevin
New Contributor I
49 Views

How to show Phone Setting?

Jump to solution

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 (2)
0 Kudos
1 Solution
PaulF_IntelCorp
Employee
49 Views

"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.

View solution in original post

1 Reply
PaulF_IntelCorp
Employee
50 Views

"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.

View solution in original post

Reply