A anaylor01 Well-Known Member Licensed User Longtime User Jun 12, 2016 #1 How can I catch when the user exits my app?
S susu Well-Known Member Licensed User Longtime User Jun 12, 2016 #2 You need to read this https://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/ Upvote 0
You need to read this https://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/
A anaylor01 Well-Known Member Licensed User Longtime User Jun 12, 2016 #3 Ok. I read it. If the user presses the home key that should call the Activity_Pause event. I put an update statement to update a table and it didn't work. Upvote 0
Ok. I read it. If the user presses the home key that should call the Activity_Pause event. I put an update statement to update a table and it didn't work.
A anaylor01 Well-Known Member Licensed User Longtime User Jun 12, 2016 #4 Are you saying I have to include the Statemanager module? Upvote 0
A anaylor01 Well-Known Member Licensed User Longtime User Jun 12, 2016 #5 This is my code but the database doesn't get updated. Code: Copy Sub Activity_Pause (UserClosed As Boolean) Timer1.Enabled = False SQL1.ExecNonQuery("UPDATE tbltemplate set Timeleft = '9'") End Sub Upvote 0
This is my code but the database doesn't get updated. Code: Copy Sub Activity_Pause (UserClosed As Boolean) Timer1.Enabled = False SQL1.ExecNonQuery("UPDATE tbltemplate set Timeleft = '9'") End Sub
S susu Well-Known Member Licensed User Longtime User Jun 12, 2016 #6 anaylor01 said: Ok. I read it. If the user presses the home key that should call the Activity_Pause event. I put an update statement to update a table and it didn't work. Click to expand... Activity_Pause will rise when the activity is not in foreground. It always works so you need to check your code first. Upvote 0
anaylor01 said: Ok. I read it. If the user presses the home key that should call the Activity_Pause event. I put an update statement to update a table and it didn't work. Click to expand... Activity_Pause will rise when the activity is not in foreground. It always works so you need to check your code first.
A anaylor01 Well-Known Member Licensed User Longtime User Jun 12, 2016 #7 The code works. It just doesn't work in the Activity_Pause event. Upvote 0