How to force an onUpdate when exiting sleep mode?

Hi,

I understand that when the user looks at the watch it exits low power mode (or at least calls OnExitSleep). Typically the onUpdate is called once a minute.

So the question is do I have to do anything codewise to force the onUpdate to occur once a second when not in low power mode.

i.e. I want the watch face to be updated once a minute if the user isn't looking at the watch and to update every second if looking at the watch face.

Ta.
  • Former Member
    Former Member over 10 years ago
    The transition from 1/minute updates to 1/second updates should happen automatically for a watch face implemented with the WatchFace class. The onExitSleep() and onEnterSleep() functions are called primarily to allow the application to start and stop timers, which are allowed during this time.

    You should be able to use the WatchUi.requestUpdate() function mentioned by Tonny inside onExitSleep() to force an update immediately upon mode change.