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

Persistence of settings (clock face)

Hi all. Just a quick one about settings and persistence. I saw someone raise this as a question on a FB group and tried it myself and he was right. When the device running the companion is not available there seems to be no persistence of settings. Example given was change a colour, take the companion device out of range (or disable Bluetooth on it), then interact with the Versa in a way that involves loading something other than the clock face. When returning to the clock face all colour changes have been lost. If the companion device is nearby then the settings are restored a few moments later, but if it is out of range then all changes are lost until you relaunch the companion. How can settings like colou change be made persistent on the device even if communication with the companion is lost? I’ve not been able to find much by way of documentation on this. I create a watch face for my own use that is experiencing this and I’d like to fix it if possible.

Best Answer
0 Votes
8 REPLIES 8
Best Answer
0 Votes

My fault for searching for "persistence" rather than "saving" 🙄

 

Seems an odd decision to not have settings stored locally on device by default. If someone has changed some colours on a watch face it's probably safe to assume they want them to stay that way even if the phone is out of Bluetooth range. 

Best Answer
0 Votes

The process is left up to the developer to determine the best location for settings data. Not all settings need to be persisted on the device.

 

You can see an example of persisting settings on the device here https://github.com/Fitbit/sdk-lcd-clock

Best Answer
0 Votes

@JonFitbit wrote:

The process is left up to the developer to determine the best location for settings data. Not all settings need to be persisted on the device.

 

You can see an example of persisting settings on the device here https://github.com/Fitbit/sdk-lcd-clock


I can see how some settings probably don't need to be persisted but I'd have thought a colour change of the clock face to one that the user wants, or an arrangement of what's displayed, would have been a couple that should probably default to on device saving. In the guides on settings to createca colour picker, there wasn't anything obvious I could see that said settings are not persisted on device by default and that this would need doing separately. It's not a problem, even thoith I am finding it fiddly to implement, just making a bit more obvious in the guides might have helped.

Best Answer
0 Votes

 

That's great feedback, will update the guide.

 

Best Answer
0 Votes

Done the way in the example on your link, do the settings persist after the user goes to another clockface, then comes back to the previous one or are those settings removed? If so, is it possible to persist settings to a file either on the watch or on phone so that when the clockface is re-installed, those settings are still persisted in a file and can be used?

Best Answer
0 Votes

File storage remains while the clockface/app isn't running, but is deleted if the clockface/app is uninstalled.

 

I think it might also be deleted if the clockface/app is upgraded to a new version.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hello All,

 

i just came across this this thread after having searched and tested for hours looking for a solution to this issue. The example you point to:

https://github.com/Fitbit/sdk-lcd-clock

Appears more complex than necessary although I’m sure there must be many ways to accomplish the same. Is there an easy to follow complete example of simply saving color settings, without creating an additional directory within companion like the https://github.com/Fitbit/sdk-lcd-clock example. I believe we need to capture the settings change on the settings change event and copy those settings to a json file then retrieve that day to use when the app loads in order to persist settings when app is closed and reopened. I am localizing my clockfaces and found when I change to a different language in the simulator the settings revert to default. In addition I haven’t seen an example that will also show the proper way to configure and load default settings, (as in the case where app is first installed and no settings have been chosen yet), while also having the ability to set and save settings. My app will apply color select settings and keep them while running but will not save them if closed and reopened. I don’t believe the color picker example and settings docs fully show how to achieve this and the sdkclock appears a bit to complex or out of the norm to easily use as an example. Perhaps it’s just my experience or lack thereof but any help would be greatly appreciated. I am trying to have both a photo picker and color select settings load, apply and save all while using the same Settings page is this a limitation or have I not spent enough time with the documentation?

 

Thanks in advance for your time and assistance.

 

 

Best Answer