How do I capture Android Tablet Back Button

  • On Android Tablets there is a "back" button.

    This does not appear to be the same as the Browser Back Button.

    Is there a way for me to register that the user has pressed the back button?

    If so how?

  • anybody?

  • Search on Plugins (addon) Section on this forum, i think you'll find what you want.

  • czar

    The Browser->On back button pressed works for me on both a Samsung Ace (Android 2.3) and Samsung Galaxy Tab 3 (Android 4.1) with a game wrapped using PhoneGap, so I'm not sure why it's not working for you.

    The manual also suggests it should work.

    On back button

    Triggered when the user presses the device's 'Back' button. Note not all devices have this button (e.g. iOS devices only have a 'Home' button) and not all platforms support this trigger.

    What actions are you trying to execute when the button is pressed? Maybe they are the bit that's not working. You could try just changing text on screen to test it.

    It could also be an issue with whatever wrapper you are using, some things don't always work with some wrappers.

  • Thanks guys - it appears I am doing the right thing however, it looks like cocoonjs is handling the "back" button also. I think I will live with it for now and check the cocoon forum later.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • blinkn i followed up your plugin suggestion - BINGO! Thanks very much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)