I was developing a cordova app,which contains a login logout functionality. The bug is when the user logs out of the app. The logout button calls inAppBrouser plugin to load logout page (from an external web source) after the logout success it stays in the same logout screen, when the user press back button it returns to main screen (from where he logged out), I want to close application there (the page he is going back is supposed to be displayed after login)
I tried clearing the history when inappBrowser gets loaded,
history.go(-(history.length - 1));
but no luck!
from the cordova documentation as JesseMonroy650 said I tried overriding the backbutton press which is not working inside inappbrowser
but the 'exit' eventListener I added seems to be working...
window.addEventListener("exit", function () {
navigator.app.exitApp();
});
the app sometimes exits evens before the back button is pressed. the problem with the listener
help& Advises needed.
window.addEventListener("exit", function () {
navigator.app.exitApp();
});
seems to be working fine after upgrading to android version 4.1.1
Cordova version : 5.0.0 InappBrowser Version : 1.1.0
No code changes were needed