04-18-2020 21:23
04-18-2020 21:23
Why does the clock face resets when you slide up the bottom menu and go back to the clock face? What is the reasoning for this and is there an event handler to detect its occurrence?
04-18-2020 21:28
04-18-2020 21:28
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.
04-18-2020 21:33
04-18-2020 21:33
Is 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.
04-18-2020 21:38
04-18-2020 21:38
It 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. 🤞
04-18-2020 21:42
04-18-2020 21:42
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.
04-18-2020 21:49
04-18-2020 21:49
Yes, 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.