HOW TO DISABLE THE ANDROID AND IOS BACK BUTTON
Application Type
Mobile

Hie, what is the jquery for disabling the android and ios back button of the main device.

and where do i put it?

Thank you

mvp_badge
MVP

Hello Rudo,

Hope you're doing well.

For disabling the back button of your device, you can use this JavaScript:

document.addEventListener("backbutton", function(){}, false);


Try to place it in a JavaScript node inside OnApplicationReady and OnApplicationResume events of your application:

Let me know if it worked for you :)


Kind regards,

Rui Barradas

Hello Rui, 

What is the other code, if you want to bring it back? for example i want to add it on a specific screen and OnDestroy of the screen, ill have it back.

I did try it and it did not work, I am trying a forge component

mvp_badge
MVP

Hello Rudo,

Thank you for your feedback.

Can you please share your OML so I can take a look?

That's very odd, because I am running this same solution in my app and it works as a charm.


Kind regards,

Rui Barradas

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.