Hello friends,
Does anyone else have a watch face that makes it obvious when a low-power mode paint has happened? It seems that onUpdate() is getting called more often that it should during low-power mode during the wake-up sequence, and I want to know if this is specific to my faces or general across Connect IQ.
If a watch face wouldn't change what's displayed between these paints, it would be hard to notice this. But my faces have some features that can make this more visible (described below).
I started looking into this because a few of my customers have been complaining about a lagginess when the watch face swaps from low-power mode to high-power mode. I can reproduce this on my devices (including an Epix Gen 2 Pro 51mm), but this behavior isn't replicated in the simulator on any device.
On various AMOLED devices, when I wake the screen via a tap or the light button, onUpdate() gets called ~6 times (in immediate succession) before onExitSleep() is called. Because of this, the watch face is getting painted 6 extra times in the "low power mode" display before the "high power mode" display is painted. As a result, the watch appears to lag when switching from low power mode to high power mode, because it continues for a second or so in the low-power mode before finally switching.
I would expect that upon a wake event (such as a screen tap or pressing the "light" button), the next call would be onExitSleep() and then onUpdate(). We would generally want the watch to immediately wake up and show the high-power mode.
To be clear:
- I do not use animations or anything that would be expected to trigger this behavior (nor should they work in low-power mode)
- There is no code that's running WatchUi.requestUpdate();
In general, one major limitation Garmin enforces is that in low-power mode developers cannot use timers or otherwise refresh the screen more than once per minute. So this suggests that it's unlikely I've written code that is causing this.
I have reviewed other posts in the forums and not found anything related. This was the closest post I found:
onUpdate is called twice
This post doesn't seem to involve the sleep/wake events.
The docs aren't exactly precise about what to expect, but they do say this:
When a gesture occurs while running in low power mode the system will call onExitSleep() to notify the application that the transition to high power mode has occurred.
The only thing I can see in the docs that may suggest what I'm seeing is somehow expected is this bullet under the onUpdate() method:
More than one call to onUpdate() may occur during View transitions
But I understand this to apply more to if a view gets pushed with an animation like SLIDE_X. No such thing is happening here that would suggest this is a view transition.
I have thought about building some kind of workaround to prevent rapid low-power mode repaints, but before I do that, I wanted to ask the community if this could be reproduced by others before reporting it as a formal bug.
This is particularly obvious on my faces, because I've built my faces with an internal burn-in protection system that moves each low-power mode paint up to 6px from the center. In addition, my watch faces include an advanced option to paint the draw time in milliseconds for each paint. As a result, you can clearly see the individual paints happening in low-power mode before the wake, since the red numbers update rapidly and the whole face moves with each paint.
Here's a video showing this behavior. Watch the red numbers on the left. Every time that updates corresponds to a new call to onUpdate().
If you can't view the directly-embedded video above, try this link: www.dropbox.com/.../IMG_3610-copys.mov
It is fully possible that this is happening to other developers but not getting noticed, since you'd have to be able to see some variation per-paint. Otherwise, it'll just be repainting the same thing, which wouldn't be noticeable. But it would be causing lagginess and wasting some battery.
Some other details:
- The watch face in this video is: LUXE Relux Daytona (RLX)
- My device is running 15.77 (I'm part of the beta program, but this doesn't appear to be a beta issue)
I've also noticed a hard-to-replicate issue where the low-power mode actually gets stuck triggering updates once per second. This is especially obvious on my faces, because each paint in low-power mode moves the entire face slightly to reduce the chances of burn-in. I'll make a separate post about that, since it seems to be a separate issue.