02-10-2019 14:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-10-2019 14:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi, I'm working on custom clockface for Fitbit. I need to vibrate my Fitbit device on certain hours. However, device vibration doesn't work when the device screen is off.
I use the following code to initialize vibration at a certain hour.
clock.ontick = (evt) => {
const today_dt = evt.date;
const currentHour = today_dt.getHours();
if(currentHour == 17) {
vibration.start("ring");
}
}
Please let me know what I can do to initialize vibration at certain hours?
Answered! Go to the Best Answer.
Accepted Solutions
02-10-2019 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-10-2019 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
clock.ontick doesn't happen when the display is off. Use setTimeout.
Gondwana Software
02-10-2019 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-10-2019 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
clock.ontick doesn't happen when the display is off. Use setTimeout.
Gondwana Software
02-10-2019 14:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-10-2019 14:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks a lot for immediate response!

02-10-2019 14:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-10-2019 14:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Off the top of my head, Date.now()
Gondwana Software

