Android Question Detecting back button and avoid to exit the app

Discussion in 'Android Questions' started by Alberto Michelis, Jun 16, 2015.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    I'm detecting the back button ok but.
    How can avoid the user to exit the app using it?

    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
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Return True

    I'm sure it would have been quicker to search for the answer than post this question ;)
    lemonisdead, fixit30, NJDude and 3 others like this.
  3. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Look HERE!

    Regards Roger
  4. NJDude

    NJDude Expert Licensed User

    Read THIS post.
    lemonisdead likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice