0
アプリケーションは正常に存在しますが、まだアクティブなアプリとしてバックグラウンドにとどまっていますか?どのように完全に終了する?PhonegapでAndroidアプリケーションを完全に終了するにはどうすればよいですか?
これは私のコードです:
function showExitDialog() {
navigator.notification.confirm(
("Do you want to Exit?"), // message
alertexit, // callback
'Exit the application?', // title
'YES,NO' // buttonName
);
}
function alertexit(button){
if(button=="1" || button==1 && navigator.app) {
navigator.app.exitApp();
} else if(button=="1" || button==1 && navigator.device) {
navigator.device.exitApp();
}
}
コメントありがとうございました。しかし、もし私がphonegap builderでそれをオンラインで構築すればどうなるでしょうか? –
私の知る限り、あなたは何の誤りもない –