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

Haptic Feedback When Screen is Off

ANSWERED

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

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Update: Changed from using clock.onTick to setInterval and it works!

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

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.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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?

Best Answer
0 Votes

Update: Changed from using clock.onTick to setInterval and it works!

Best Answer
0 Votes