IanMc Well-Known Member Licensed User Longtime User Aug 14, 2013 #1 That when you are viewing your app, if you press the back button it deletes the app from memory?
thedesolatesoul Expert Licensed User Longtime User Aug 14, 2013 #2 The activity. Yes, I was under the impression it didnt do that. The back key is quite weird. Upvote 0
TomA Active Member Licensed User Longtime User Aug 15, 2013 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2013 #4 Pressing on the back key is equivalent to calling Activity.Finish (unless you intercept the key press). http://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/#content Upvote 0
Pressing on the back key is equivalent to calling Activity.Finish (unless you intercept the key press). http://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/#content
nfordbscndrd Well-Known Member Licensed User Longtime User Aug 15, 2013 #5 IanMc said: That when you are viewing your app, if you press the back button it deletes the app from memory? Click to expand... See this page in the Wiki. Upvote 0
IanMc said: That when you are viewing your app, if you press the back button it deletes the app from memory? Click to expand... See this page in the Wiki.