Android Question did you know

IanMc

Well-Known Member
Licensed User
Longtime User
That when you are viewing your app, if you press the back button it deletes the app from memory?
 
I think it only does that if you let it - if you trap the key, you can prevent that with something like

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
if [some condition] then
Return False ...Let it exit
Else
Return True ...Consume the event and prevent back from causing exit...
End If
End If
End Sub

Tom Aman
 
Upvote 0
Back
Top