App's or Widget's Local storage

Former Member
Former Member
Hi,

how does one store some values locally for later reuse within the Connect IQ App or Widget?

I see Local Storage API advertised but cannot find it documented anywhere.

Cheers
Rok
  • The AppBase class has setProperty() and getProperty() methods that you can use to serialize data.

    It should be noted that there are currently known issues if you want to serialize objects of type Array or Dictionary. As it currently stands, the system tries to avoid writing data when nothing has changed. This optimization causes problems. The workaround is to make a copy of the Array or Dictionary and then serialize that. If you want to avoid writing when no changes have been made, you need to keep a flag to indicate that your copy of the data is dirty and needs to be written out.