I would like to make sure that my Vivoactive HR does not go into High Power mode ?
Is there any way I can prevent it from doing so. It is messing up my watch face.
if you're not in low power mode, look at the time and if seconds is not zero, return and don't do anything. (this is to handle not being in low power mode when you would normally get an onUpdate() so you still do the onUpdate() code at the "top of the minute".
class MyWatchFace extends Ui.WatchFace
{
// true indicates that the watch face state has changed since the last
// call to onUpdate. if it is true, we should redraw.
hidden var mChanged;
// true indicates that the watch face is in low power mode. if it is true,
// we should redraw.
hidden var mSleeping;
function initialize() {
WatchFace.initialize();
}
function onEnterSleep() {
mSleeping = true;
mChanged = true;
Ui.requestUpdate();
}
function onExitSleep() {
mSleeping = false;
mChanged = true;
Ui.requestUpdate();
}
function onShow() {
mSleeping = false;
mChanged = true;
}
function onUpdate(dc) {
if (!mChanged && !mSleeping) {
return;
}
mChanged = false;
// draw
}
}