Implement exit from app

This commit is contained in:
OleSTEEP 2024-03-02 01:23:21 +03:00
parent f57729c35a
commit 514789724e
2 changed files with 26 additions and 2 deletions

View file

@ -381,4 +381,16 @@ document.addEventListener("deviceready", () => {
});
});
}
})
})
// =============================
// Close Android app from JS
// =============================
SceneManager.terminate = function () {
navigator.app.exitApp();
};
window.close = function() {
navigator.app.exitApp();
}

View file

@ -384,4 +384,16 @@ document.addEventListener("deviceready", () => {
});
});
}
})
})
// =============================
// Close Android app from JS
// =============================
SceneManager.terminate = function () {
navigator.app.exitApp();
};
window.close = function() {
navigator.app.exitApp();
}