cordova android close app with back button

Solutions on MaxInterview for cordova android close app with back button by the best coders in the world

showing results for - "cordova android close app with back button"
Lennart
19 Jan 2021
1document.addEventListener("deviceready", onDeviceReady, false);
2
3function onDeviceReady(){
4    document.addEventListener("backbutton", function(e){
5       if($.mobile.activePage.is('#homepage')){
6           e.preventDefault();
7           navigator.app.exitApp();
8       }
9       else {
10           navigator.app.backHistory();
11       }
12    }, false);
13}
14
similar questions
cordova reload app