setTimeout()
setTimeout()
who knows how the function works, especialy when switching off the display?
I have set a
setTimeout(“callback”,30*60*1000). // 30 Minutes
When the phones display is off the timer is not fired.
How can i get a more reliable solution?
]]>« Is there more comfortable way to edit scripts – telnet or by remotely editing from a linux system? (Previous Post)
(Next Post) Teaser for coming apk »
< ![CDATA[
SetTimeout uses a handler (my guess), which lives inside lightnings process. A process might be paused when screen is off.
You should probably use alarmmanager for this. It will be more complex though.
]]>
< ![CDATA[
has anyone an example?
]]>
< ![CDATA[
can’t check right now, but i beleave my run-of-ui script is in my script-only-template on the wiki.
i think it’s timeout servives deep-sleep.
dumb side remark: alow LL in greenify/power-nap or whatever battery-saver you might use.
]]>
< ![CDATA[
@ Jappie Toutenhoofd:
i tried to check the sourcecode of the script-only-template, but i had no luck. The code seems to be in a JSON Container.
How can i get a readable format?
]]>
< ![CDATA[
it is a template. put it in the folder with your backups. And import in via LL.
dumb site remark: backup your own setup first.
]]>
< ![CDATA[
Did you find it? Does the timeout work for you?
]]>
< ![CDATA[
i had no time for now – maybe tomorrow
]]>