I have a problem with my phonegap application. I want to minimize the application (send App in background so that it's still running) when back button is pressed.
Here's my code.
document.addEventListener("backbutton", onBackKeyDown, false);
function onBackKeyDown() {
}
If I use navigator.app.exitApp();
- my application will terminate
and If I use navigator.app.backhistory()
- It will just go back to the previous page.
I want that if I press Back button, it will send me to Home screen and send the application to background so that it's still running. Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…