Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When the screen is off, app is not running

ANSWERED

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.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

No, but you can still respond to other events and/or use setInterval()/setTimeout().

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Your app stays running unless another app is started. However, ontick events don't occur when the screen is off.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

is there a way to make ontick events occur if the screen is off?

Best Answer
0 Votes

No, but you can still respond to other events and/or use setInterval()/setTimeout().

Peter McLennan
Gondwana Software
Best Answer
0 Votes