Watch face life cycle strategy

Hi!

I'm currently making a watch face and was a little surprised when running it in my Instinct 2. It seems every small change/input will restart the app completely. Even unlocking (or auto lock) the watch or getting a message notification causes a restart. 

Am I doing something wrong or is this by design?

  • On devices like the I2, anything you do that leaves the WF and then comes back will restart your app (say using up to go to the glance loop)  .

    Some things may just cause onUpdate() to be called.  You always want to draw the entire screen in onUpdate().

    What are you seeing that's an issue?

  • Thanks for the quick response!

    Battery life, depending on usage. Also simple watch faces vs more complex faces that can't benefit from caching the calculated display-data (yes, in storage, but expensive)

    Being the "always on" app you eventually return to I thought the only situations for a full restart would be changing the watch face or restarting the watch.

  • Most of the time, a watch face is only updated once a minute.  It will be for about 10 seconds after a gesture.  With onPartialUpdate() you can update a part of the screen, such as seconds, every second.

    The watch face I'm using on my I2 Solar uses onPartialUpdate for seconds, and also uses a background service that runs every 15 minutes to get data from the web and saves it in Application.Storage  I get 25+ days of battery on a full charge and no activity recording.  

    The I2/s doesn't really have the "always on"concept as you see with a Venu/epix2.  MIP displays are cheap battery wise, and blanking them makes little difference.

  • Thanks a lot for input! I'll see what I can do. Still, if Garmin platform people reads this it would be interesting to hear if there is a particular reason for this behaviour

  • I'm still unsure what issue you have.  Is it something where you can do a video?

  • My point, without having any benchmarks, is that when for instance having the possibility to hide seconds when watch not "active" helps battery life, common sense tells me that not re-allocating, re-initiating, re-calculating, reading from storage etc for every button press / popup / message that happens must be a good thing. If you show time only or a video clip or whatever.

  • If you don't want seconds when the watch face is in low power mode to save battery, don't use onPartialUpdate or make it configurable.

    Sounds like what you are concerned about is the same with every watch back to the va and fenix 3.

    Application.Storage can be expensive as you will be hitting the watch's file system every time for every key, but the same when you are loading resources like strings and custom fonts.  There are things you may want to calculate once each time the WF starts, but you may consider not trying to cache them in storage unless needed.

  • Yes I'll adapt to the way things works, but aren't you curious?

  • I've been doing watch faces for 7 years and things work as I expect.