setInterval

56 views
Skip to first unread message

m.j.vand...@gmail.com

unread,
May 26, 2024, 12:48:02 PMMay 26
to DroidScript
When I set an interval with setInterval I know I can clear it with clearInterval. I like to understand if it is needed to use clearInterval when the program completely stops or if the interval is cleared automatically? And if so, how can I call it (I found OnStart, OnPause, OnResume, but I could not find something like OnStop of OnExit).

regards,
Mark
Message has been deleted

samkm

unread,
May 27, 2024, 6:06:24 PMMay 27
to DroidScript
Hey Mark :)
Any callback set with setInterval or setTimeout, along with pretty much everything else in your app, will be automatically cleared when the app stops running! I don't think there is an app event, like OnStop, for when the app exits though, sorry :(
Hope that helps!
Sam

Alan Hendry

unread,
May 30, 2024, 3:41:55 PMMay 30
to DroidScript
HI,
If you code EnableBackKey(false) then an OnBack function
is invoked when the user touches Back (on the Android tool bar)
but unfortunately not when they touch Recent Apps and close the app.
Regards, ah
Reply all
Reply to author
Forward
0 new messages