Does anyone know how to disable the back button on an Android mobile game?
In the past, when I pressed it a message popped up asking me if I wanted to close the app. I believe this was with CocoonJS, however I'm now using Cordova.
Now, when I press it, the game instantly closes without any notifications. I'm building a game that requires the player pass the phone to another player, and on occasion, with my phone (Samsung Note) a player can press the back button by mistake. If they press any other button, including the power button, the game remains open. The back button, however, as I said, closes it, and when you open it again, it starts from the beginning.