Storage location of Properties

Is Properties.setValue() stored on the watch or the device used to change a setting or both?

I "think" it is stored on the phone with a data transfer to the watch whereas App.Storage.setValue... is stored directly on the watch.  Is this correct?

Thanks

Top Replies

All Replies

  • Both storage and properties are stored on the watch.

    I think for the phone only those properties are relevant that are linked by a setting visible in the app settings. You'd have to try if a change to such a property is actually synced back to the phone (or there may be other users here who already know the answer).

  • Is Properties.setValue() stored on the watch or the device used to change a setting or both?

    I "think" it is stored on the phone with a data transfer to the watch whereas App.Storage.setValue... is stored directly on the watch.  Is this correct?

    I feel like this question kind of assumes that every property is necessarily associated with a setting, but that's not true (although the docs used to kinda sorta say that). (The converse is true, though: every setting has an associated property.)

    You'd have to try if a change to such a property is actually synced back to the phone (or there may be other users here who already know the answer).

    Short answer: yeah, changes in properties made by the device are reflected in the associated settings in the Connect IQ app.

    Long answer:

    Properties (that are linked to settings) aren't literally "synced" to the phone (in a persistent manner), as the Connect IQ phone app retrieves settings from the Garmin device in real time when you press the Settings button. (If the Garmin device is not connected via bluetooth, the Settings button doesn't work.)

    But yeah, if your app changes a property, then that change is reflected in the corresponding setting when you open the app settings in the Connect IQ phone app. Thus, in a single app, you should be able to implement classic "off-device settings" (to be edited in the Connect IQ phone app or Garmin Express) and on-device settings, both of which use the same set of properties.

    So even if app settings were somehow temporarily or permanently cached on the phone, it wouldn't matter since the corresponding properties on the device are supposed to be the "source of truth", and there's no way to change settings without a connection to the device, rendering such a cache useless at best and buggy at worst. As a matter of fact, there's a bug where Connect IQ store app shows the wrong settings values under certain circumstances.

  • So, from a practical programming point of view, I should only use the App.Storage function when the option can only be changed on the watch. However, if I can change it on both (the phone app and watch face), I should exclusively use the  Properties function.  Is that correct?

  • That's what I do.  Storage also allows you to save more data than Properties

  • Property if you want an app to have a default for it.  Corresponding setting if you want the user to be able change it. Storage if you want the app to remember a run time value between executions or a value it retrieves via a web call needs to be saved etc.

    Both will be on the watch and the app can execute with your phone nowhere near.