06-28-2019 16:32 - edited 06-28-2019 16:34
06-28-2019 16:32 - edited 06-28-2019 16:34
Hi guys,
I am building a clock face and am finding that when the Fitbit app is open on my phone, the Fitbit device drains extremely quickly. When the phone app is closed, the device drains at a more stable 1% per hour.
The basis of my code is from a previous post that uses setTimout to call a function when the screen is on.
Any thoughts on how to limit the Fitbit watch power drain when the phone app is open?
import { display } from "display";
let timeoutID;
display.addEventListener("change", function() { if (display.on) { wake(); } else { sleep(); } }) function wake() { // do something when the screen wakes
// also, cancel the timeout if it's still scheduled
clearTimeout(timeoutID); } function sleep() {
// do something when the screen sleeps
// here you can calculate when you need to wake up
let delayMilliseconds = 30 * 60 * 1000; // 30 minutes
timeoutID = setTimeout(doSomething, delayMilliseconds); }
function doSomething() {
// do this even when the screen is still off
}
Answered! Go to the Best Answer.
07-01-2019 13:53
07-01-2019 13:53
If you have the developer bridge enabled, then you're using WiFi and that will drain the battery.
07-01-2019 13:53
07-01-2019 13:53
If you have the developer bridge enabled, then you're using WiFi and that will drain the battery.
07-01-2019 14:29
07-01-2019 14:29
Thanks Jon. Yes it looks like the developer bridge was the problem.