When you swipe up, you're starting the 'Today' app. This is equivalent to starting any other app by swiping left and touching an app icon.
Whenever any app is started (including 'Today'), your app is closed.
There's an onunload event, but I don't tend to trust it.
When the 'Today' app is closed (as with any other app), your clockface will restart. That's the 'event' I use to reinitialise everything.
Best AnswerIs the expected/most common approach to data that relies on an external API to be cached within the watch via the filesystem API? The messaging API seems very unreliable too.
Best AnswerIt sorta depends. If the data doesn't have to be 100% up-to-date and isn't too bulky, storing a local copy on the watch for fast restart is a good idea. If need be, you can indicate how 'fresh' it is while waiting for the latest data to arrive on restart. 🤞
Submitted a clock face that relied on the messaging API not so long ago and the app reviewers team complained it is not loading for them, then I noticed that when the companion got reconnected the messaging API would stop working altogether... rewriting to use the filesystem API as yet another experiment, thanks.
Best AnswerYes, I've noticed that about messaging too. File transfers will be automatically retried by the system, so tend to recover better. They can be a bit slower but, if your data is coming from an external API, you probably won't notice.