06-23-2018 16:35
06-23-2018 16:35
Hi all,
I am trying to make an app similar to a countdown timer. When the timer hits 0 it should vibrate the users wrist. I have just run into a snag where the timer does not keep running and the haptic feedback is not received when the screen is off.
Is there anyway to do this? Even a round about way works for me. My only other choice is to keep the screen on while the app is running, but that's clearly a bad solution.
Thanks in advance
Answered! Go to the Best Answer.
06-23-2018 17:10
06-23-2018 17:10
Update: Changed from using clock.onTick to setInterval and it works!
06-23-2018 17:00
06-23-2018 17:00
You app should keep running with the screen off, unless the user switches to a different app or clockface.
However, clock.ontick() doesn't fire when the display is off. You're probably not using that anyway.
06-23-2018 17:06
06-23-2018 17:06
I actually was using clock.tick and didn't realize it was the reason my app wouldn't run in the background. I guess I should use Javascript setInterval method instead?
06-23-2018 17:10
06-23-2018 17:10
Update: Changed from using clock.onTick to setInterval and it works!