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?

]]>

7 Commentsto setTimeout()

  1. Anonymous says:

    < ![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.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    has anyone an example?

    ]]>

  3. Anonymous says:

    < ![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.

    ]]>

  4. Anonymous says:

    < ![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?

    ]]>

  5. Anonymous says:

    < ![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.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Did you find it? Does the timeout work for you?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    i had no time for now – maybe tomorrow

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *