03-29-2018 07:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-29-2018 07:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello dev world. I have a watch face running a couple of animations. I use the function to delay the animation time. The trouble is I want this animation to happen every time the watch face comes on. I get the feeling currently that the animation is always running no matter what ( if i have it on infinite) which in turn i would assume would have an affect on the battery.
I have tried different things in terms of enable etc but none of these seem to activate when the screen comes on and runs everything else.
Now, it works when i use the click as the begin point but so is there something simple I am missing or do i just have run with it and play around with the animation setting to limit the drain on the battery.
Thanks in advance.
Answered! Go to the Best Answer.

Accepted Solutions
03-29-2018 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-29-2018 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
import { display } from "display"; display.addEventListener("change", function() { if (display.on) { wake(); } else { sleep(); } }) function wake() { // do something when the screen wakes
// https://dev.fitbit.com/build/guides/user-interface/animations/#javascript-animations
myinstance.animate("enable"); // Specify the name of the event to trigger } function sleep() {
// do something when the screen sleeps }

03-29-2018 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-29-2018 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
import { display } from "display"; display.addEventListener("change", function() { if (display.on) { wake(); } else { sleep(); } }) function wake() { // do something when the screen wakes
// https://dev.fitbit.com/build/guides/user-interface/animations/#javascript-animations
myinstance.animate("enable"); // Specify the name of the event to trigger } function sleep() {
// do something when the screen sleeps }

03-29-2018 16:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-29-2018 16:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Worked a treat, thank you

