Disable Back Button - Android

Control the default back button of the phone, blocking the user to go back in the app

You'll need to import the javascript file in your website before starting from this link.

window.WTN.customBackHandling({
    enable:true/false
})

enable (Boolean parameter) - Passing this true will disable the back button.

customBackHandling this function on the window will be called where you can handle the back functionality. Example:- windows.customBackHandling = function(){ //Handle your logic }

Feature added in Android on 27/06/25

Last updated

Was this helpful?