Android Question Exit app when sleep for 3 minutes

manuaaa

Member
Licensed User
Longtime User
Hi,

i want my app should exit when it is idle for 3 minutes. what should i do . i am using b4a version 2.71

Thanks in advance

regards,

manu
 

DonManfred

Expert
Licensed User
Longtime User
Use a Timer. Set it´s intervall to 1000 or so. Set a global var and set the value to 3*60 (180)
In timer tick you count down the global variable (-1)
- Whenever a action is made. Reset the global var to 180
- When reaching 0 stop the timer and call Activity.Finish
 
Upvote 0
Top