Android Question When the user exits my app

anaylor01

Well-Known Member
Licensed User
Longtime User
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

anaylor01

Well-Known Member
Licensed User
Longtime User
This is my code but the database doesn't get updated.
B4X:
Sub Activity_Pause (UserClosed As Boolean)
    Timer1.Enabled = False
SQL1.ExecNonQuery("UPDATE tbltemplate set Timeleft = '9'")
End Sub
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…