Reputation: 631
Using phonegap 2.5.0 but the exit app always gives object has no method exitApp
used navigator.device.exitApp()
Is this depreciated? or am I just using it wrong
Thanks
Upvotes: 2
Views: 5565
Reputation: 2170
You can use this condition
if (navigator.app) {
navigator.app.exitApp();
}
else if (navigator.device) {
navigator.device.exitApp();
}
this works fine. No version Problem.
Upvotes: 4