How to exit from the phonegap app on Android...

  • 1
  • Problem
  • Updated 7 years ago
Hi Team,

I am trying to exit the phonegap application on IOS. exit function is working fine on android but doesn't works in iOS.

I have use below code :

navigator.app.exitApp();
navigator.device.exitApp();

Please give solution for my problem.

Thanks,
Siva.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
That call is not supported on iOS. The iOS SDK intentionally does not allow an app to exit itself.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
HI Wildabeast,

Thank you for your kind response.

Thank you,
Siva.
Photo of Mangesh Karandikar

Mangesh Karandikar

  • 2 Posts
  • 0 Reply Likes
Hi gudluri siva, can you please explain me how exactly You implement this code? I made an android app based on accordion where users click on headers to open content. There are more than 50 such headers. So if a user goes through 15 'tabs' he has to use the back button 15 times to quit the app. Could you guide me please? I am a newbie, so I will need a little detailed guidance. What to put in headers? How to give an exit button or capture the back button, etc.