I want to intercept a key. eg:volume_up
I use these code, it work. but if press home or back, the app will exit. it cant work.
how to let the app keep running on background.
I use these code, it work. but if press home or back, the app will exit. it cant work.
B4X:
Sub Activity_keyPress (KeyCode As Int) As Boolean 'Return True to consume the event
If KeyCode = KeyCodes.KEYCODE_VOLUME_UP Then
ToastMessageShow("up",False)
Return True
End If
End Sub