Non-volatile storage?

Hi there
I'm new on this forum.
Planning to write some code but I have some concerns maybe you could help me clarify.
Trying to figure out if there is any way I could store some small amount of data in kind of non-volatile storage that is kept between power cycles or at least after ConnectIQ app is closed.
I was thinking about an app that in a shape of simple data fields but it has to rely on some user configurable data (from watch not from PC/phone). Since data fields do not allow any input I was thinking about splitting this into 2 portions:
- App that allows user to configure and store configuration in some persistent storage
- Data fields that uses that configuration data and is added to native Run activity profile (I would like to stay with this native Run activity and just add data fields)
Doable?
  • Hi,

    You can save data in key-value pairs using getProperty and setProperty methods, which is suitable for most circumstances. You can also set configuration using Garmin Express for any enabled Data Fields, and therefore don't need to have a separate App to do this. Remember you only currently have 16Kb total space for a Data Field, so would need to keep any application and data used below this limit.

    Cheers
    Chris
  • Sorry. just an after thought - One App can't access another Settings store, so just beware if you're considering having a seperate App changing a Data Fields data.

    Cheers
    Chris
  • As Chris said, App1 can't read or modify App2's settings or object store. The only way to easily this is have app-settings for your datafield, and you can configure it with GCM or GE.

    Your settings will be saved across reboots, etc (non-volatile and changeable)
  • Hi,

    You can save data in key-value pairs using getProperty and setProperty methods, which is suitable for most circumstances. You can also set configuration using Garmin Express for any enabled Data Fields, and therefore don't need to have a separate App to do this. Remember you only currently have 16Kb total space for a Data Field, so would need to keep any application and data used below this limit.

    Cheers
    Chris


    Ok thx, and what is the key-pairs' range?
  • Ok so what is the range of key-value pairs?
  • It is not clear what you are asking; key-value pairs don't have a range. The setProperty() and getProperty() methods on the AppBase have some limitations. Those limitations are documented.

    Travis