How can we setup a BP to detect when a user presses the back or menu button on Android?

How to do we detect when a user presses the back or menu button on their android phone?

1 Like

In Android those buttons (this include all buttons that phone and tablet can have, like VolUp, VolDown) are visible as keyboard buttons even if they are virtual, If engine don’t forward them with there APIs (and Blueprint) you might find something in Android NDK which means dealing with C++.

Normally you should add action stacks in order for utilize Back button on your own (by default it all automatic) but it seems UE4 already avoid this need and back button does nothing by default, Back button might be registered as Backspace or Escape keyboard presses you could try that.

You also should avoid using menu button as Android guidelines recommands, it’s supposed to be not used anymore since Android 3.0 and you can still see because of application legecy support

Back button now supported in UE 4.4 preview which you can download already in the launcher :slight_smile:

The bad news it doesn’t quit the app :confused: Anyone found a solution for this??

As of UE 4.4.1 (at least) you can now just call the “Quit Game” function from the back button input to cause the game to quit.

Android back node has a problems on cell phones with one button. You need to press 4-6 attempts on Meizu to run Android back. Please fix this error I waiting almost a year to get things done.