0

I need to exit Android Phonegap application by clicking on button I tried to use this code in onclick event

navigator.app.exitApp()

but it didn't work and nothing happened, So How to do it?

Morad Edwar
  • 1,030
  • 2
  • 11
  • 27

2 Answers2

3

You need to add a listener event for the button and associate a function. Check here.

It would be a good idea to update your phonegap/cordova version to the latest build and use the code provided above.

Community
  • 1
  • 1
0

Try to upgrade PhoneGap.js, it may be solve your problem

Devangi Desai
  • 1,355
  • 12
  • 17