On my app, I have:
this.platform.registerBackButtonAction(this.backButtonAction.bind(this), 500);
Which does
private backButtonAction() {
Vibration.vibrate(30);
if (this.nav.canGoBack())
this.nav.pop();
else
this.openPage(ProfilePage);
}
But this code does not dismiss modals, so I added in my modal:
this.platform.registerBackButtonAction(this.dismiss.bind(this), 600);
Which does indeed dismiss the modal on back button, but makes the other listener not to work (fair, lower priority).
Is there a way to unregister this action (when leaving the modal)?
I have another case where in the same page, you have a 3 steps progress, and when you are on step 2, I wan’t back button to go back to step 1. Without unregistering the listener I kind of can’t.
Thanks!