Android Question Detecting back button and avoid to exit the app

Alberto Michelis

Well-Known Member
Licensed User
Longtime 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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…