I use this for one of my current app.
I saw most of the apps use a toastermessage saying "Press back key again to exit"
Here I can easily show that message after single back button click. But how can I detect second button press to exit the app?
B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
Select KeyCode
Case KeyCodes.KEYCODE_BACK
Dim m As Int
m = Msgbox2("Are you sure to close this app?", "Confirmation", "Yes", "", "No", Null)
If m = DialogResponse.POSITIVE Then
ExitApplication
Else
Return True
End If
End Select
End Sub
I saw most of the apps use a toastermessage saying "Press back key again to exit"
Here I can easily show that message after single back button click. But how can I detect second button press to exit the app?