I am working on a capacitor with bootstrap mobile project and everything seems to be working except the back button on android which do not exit the app even after navigating in history. below is my code to exit the app:
Capacitor.Plugins.App.addListener(‘backButton’, ({canGoBack}) => {
if(!canGoBack){
CapacitorApp.exitApp();
} else {
window.history.back();
}
});
I don’t know but the app do not exit using the back button
Please help me and i will appreciate any suggestions