Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best way to save state of a watch face

Hi. I want to create a watch face that shows the AZM per week, per day or the current zone (resting, cardio, peak,...) but only one at a time. I want to switch between the 3 views by clicking on the screen if the watch face is active. 

I know how to do this all, but what is the best way to save the state which of the 3 views should be shown? I would go with a global variable but I think I've read somewhere on this forum, that watch faces get closed if I open another app or swipe up to the today-screen and the value of the global variable gets lost.

Not really sure how to try that in the Fitbit OS Simulator, because I can't see other apps there or the today-screen.

Best Answer
0 Votes
1 REPLY 1

The best way is probably to save your clockface's state data to the watch file system (either whenever it changes, or whenever it is unloaded), and then load the data (if any) when your clockface starts.

You can test this using the sim by swiping left or right to close the clockace, or just launch the clockface again.

Peter McLennan
Gondwana Software
Best Answer