Any way to override the android back button functionality on certain pages?

I have one page in my app that I do not want to be dismissed if the user presses the back button on their android. Is there a way to prevent back button in certain cases?

I tried this, but it didn’t work:

		document.addEventListener('backbutton', evt => {
			evt.preventDefault();
			evt.stopImmediatePropagation();
		}, false);
1 Like