Android Question HomeButton Keypress Display Message?

ronovar

Active Member
Licensed User
Longtime User
I need when user press HOME button on remote control to display message box...but i added thsi code and apk is paused and exit.

B4X:
'GET - KeyPressed
Sub Activity_KeyUp (KeyCode As Int) As Boolean
    'SELECT - Remote Code
    Select KeyCode
            Case KeyCodes.KEYCODE_HOME
                 Log("Display Meesage to exit apk? Yes OR No")
    End Select
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
You need to resume the event.
Return true from the sub

Additional I suggest to call a sub with callsubdelayed to display the message box there
 
Upvote 0
Top