0
私はnavigator.app.exitApp()を使いたいです。ダイアログボックスで私のcordovaアプリを終了します.iはまた、cordovaダイアログプラグインをインストールしました。navigator.app.exitApp();コードブラウザのダイアログプラグインを使用すると動作しません
これは私のコードです:
<script>
function onConfirm(buttonIndex) {
alert('You selected button' + buttonIndex);
}
navigator.notification.confirm(
'Do you want to exit app?', // message
onConfirm, // callback to invoke with index of button pressed
'Exit', // title
['Yes','No'] // buttonLabels
);
onConfirm(buttonIndex) {
if (buttonIndex==2){
navigator.app.exitApp();
}
}
</script>
<button onclick="onConfirm(); return false;">Exit</button>
しかし、それは動作しません。
どうすれば解決できますか?
ありがとうございました。
を進めています。 –