Artificial intelligent assistant

Backキーでアプリを終了させたいです monacaandroid back()→ → * * document.addEventListener("backbutton", onBackPressed, false); function onBackPressed(){ confirmExit() } function confirmCallback(id){ if(1 == id){ navigator.app.exitApp(); } } function confirmExit(){ navigator.notification.confirm("", confirmCallback, "", ",") } m(__)m * * * Myaku → `index.html`3 m(__)m document.addEventListener( "deviceready", function(){ document.addEventListener("backbutton", onBackPressed, false); }, false ); function onBackPressed(){ confirmExit(); } function confirmCallback(id){ if(1 == id){ navigator.app.exitApp(); } } function confirmExit(){ navigator.notification.confirm( "", confirmCallback, "", "," ); }

`deviceready`EventListener


document.addEventListener(
"deviceready",
function(){document.addEventListener("backbutton", onBackPressed, false);},
false
);




>




*
*
*
*
*





`index.html`


* * *

****



`navigator.notification`

``>`Cordova`>`Notification (org.apache.cordova.dialogs)`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 889598fde27a2ecd4823a3ffe7c47f24