I'd need an experiment to prove it, but it seems like the OS will call onUpdate just before onHide when a watch face is shutting down. I'd like a way to discern between an update when the app is shutting down and a "normal" update so I can avoid expensive drawing operations as the app is shutting down. This would help make the exit animations smoother. Has anyone else encountered this and come up with a solution? Thanks.
Okay, there is a lot of stuff here. I don't know if anything I have to post here is going to be helpful or if it will just be reiteration of what you guys have already figured out.
When the device transitions away from a watch face it will trigger a display update to prepare for transition. I can't say this update is really useful from the perspective of a watch face, but it is the way the native system works, so we probably won't be able to remove the behavior.
A WatchFace is not going to have any good way of knowing what type of update has triggered. You can probably make a reasonable guess based on the timing of the update, but no system input can be received by the app.
You could attempt skipping draws when no data has changed, but without special handling that would cause issues when the watch face transitions in from the widget loop.
Note that WatchFaces can only use timers when they are out of sleep mode. Saving the dc and using it outside of onUpdate is not advised.
onHide may not be getting called when a view closes. I think this is currently only guaranteed when another view is added on top of the current view. I am not sure what the defined behavior is, so we will try to audit that behavior and clean it up if it is incorrect.
.....onHide may not be getting called when a view closes. I think this is currently only guaranteed when another view is added on top of the current view......
So maybe you could throw a mask view over your view to act like an event handler?