I haven’t been able to get it to work for a few weeks now the Hardware Back Button. currently when we click back button the app is closed.
this.platform.backButton.subscribeWithPriority(-1, () => {
console.log("test")
});
CapacitorApp.addListener('backButton', ({canGoBack}) => {
if(!canGoBack){
console.log("exit");
CapacitorApp.exitApp();
} else {
console.log("back")
window.history.back();
}
});