View.onUpdate simulator vs watch

Good evening,

I am writing an app that is doing a web request triggered by a timer every 10 seconds. When the response to the web request is received, I trigger WatchUi.requestUpdate() and redraw the screen in View.onUpdate(). In the simulator, the onUpdate is (apart from the beginning) only called when I call WatchUi.requestUpdate(). However, when running the app on my watch, an Epix Pro Gen 2, I get calls to onUpdate() every second or so, independent from the responses to web requests.

Does anyone know why the watch is making these regular onUpdate calls, but the simulator is not?

Also I tried to optimize onUpdate and clear/redraw the screen only when the content actually changed. But it seems that does not work. If I do not clear/redraw the screen in every onUpdate call, then it just turns black, until the next time I clear/redraw.

So is it required that every onUpdate redraws the screen content?

  • There are many threads about trying to only update part of the screen in onUpdate.  The simple answer is don't do it.  Always update the full screen.

    Do you see the every second onUpdate calls with the primate sample?

    Having a 1 second timer that calls requestUpdate() is pretty common in device apps and widgets

  • I haven't checked this with the Primates sample up, but I see the every second onUpdate calls in my own app when it runs on my watch (not in the simulator).

    For these onUpdate calls that are somehow triggered by the system and not by a data change on my side, I'd like to not update the screen at all. This is also not recommended?