setInterval in background application

8 views
Skip to first unread message

Mikhail Shevchuk

unread,
Sep 25, 2009, 3:19:27 AM9/25/09
to webos-...@googlegroups.com
Hello, developers

I am having issues with building some kind of a timer thing in my
background application:
setInterval doesn't work for that and throws an error about that it
doesn't work in hidden apps.

How is the setInterval method can be implemented in such cases?

Any tips are very appreciated.

--
http://blog.shevchuk.org

Alice Carback

unread,
Sep 27, 2009, 6:42:12 PM9/27/09
to webos-...@googlegroups.com
setTimeout and setInterval are window events, with the binding done:

this.controllwer.window.setTimeout( this.handler.bind(this), interval );

Perhaps if you had at least an item in the dashboard. Your app wouldn't be completely hidden, but it would at least have a display element that was always open. You could try to set the setTimeout or setInterval in there and still have it work in the background.

Many Thanks,
Alice Carback

Get Dropbox http://bit.ly/137wm
A2 Hosting http://bit.ly/4w2RHO
Reply all
Reply to author
Forward
0 new messages