Android Question Detecting back button and avoid to exit the app

Alberto Michelis

Well-Known Member
Licensed User
I'm detecting the back button ok but.
How can avoid the user to exit the app using it?

B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
  Select KeyCode
  Case KeyCodes.KEYCODE_BACK
       Msgbox("You cant exit the app", "Recuerde")
       Return ???????
  End Select
End Sub
 
Top