B4J Question Auto shutdown app after idle

le_toubib

Active Member
Licensed User
Longtime User
Hi all
I'm trying to exit application when the user is not using it for a set time.
I tried to reset a timer on mouse move .. but the app crash ...
Is there a better way?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I tried to reset a timer on mouse move .. but the app crash ...
You need to provide more information. What did your code do? Why it crashed?

Create a timer that ticks every 10 seconds. Store the current time in a global variable in the MouseMove event. Check whether x seconds have passed in the timer tick event.
 
Upvote 0
Top