05-29-2019 11:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-29-2019 11:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
My app doesn't run when the screen goes off. For example, I put several console.log in the code to see if every function works. But when I'm using my Fitbit and the screen turns off, it stops the code and doesn't refresh unless I turn it on again. Is there a way to make the code run without letting the screen on permanently? Thank you.
Answered! Go to the Best Answer.

Accepted Solutions
05-29-2019 16:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-29-2019 16:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
No, but you can still respond to other events and/or use setInterval()/setTimeout().
Gondwana Software

05-29-2019 13:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-29-2019 13:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Your app stays running unless another app is started. However, ontick events don't occur when the screen is off.
Gondwana Software

05-29-2019 16:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-29-2019 16:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
is there a way to make ontick events occur if the screen is off?

05-29-2019 16:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-29-2019 16:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
No, but you can still respond to other events and/or use setInterval()/setTimeout().
Gondwana Software

