I am developing a small App with Phonegap. I would like to add a button for the users to close/kill the app but it is still running in the background. I used the codes from this thread: Is it really posible to close a PhoneGap App? and used the following function:
function CloseApp() {
if (confirm('Close this App?')){
if (navigator.app) {
navigator.app.exitApp();
}else if (navigator.device) {
navigator.device.exitApp();
}
}
}