Android Question When the user exits my app

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
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
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.
Activity_Pause will rise when the activity is not in foreground. It always works so you need to check your code first.
 
Upvote 0
Back
Top