3

I am building an app for the Samsung Galaxy Watch (Tizen OS via html/css/javascript).

The user is able to set individual settings in the app / enter custom information.

Question: How can I ensure that this user supplied information is saved between app updates?

Wanted Outcome:

  1. User installs app version 1.
  2. User inputs data into app version 1.
  3. An update to app version 2 becomes available.
  4. User updates to app version 2.
  5. User data supplied in app version 1 is available in app version 2 (after update).
  • Welcome to stackoverflow. Please paste your code here and show us what you have tried so far. – Ahmad Maleki Sep 25 '19 at 11:48
  • @Ahmad, I do not have any code. I am rather asking for a general guidance. I was thinking about generating a unique user id (tied to the watch) and upload the user input from the watch app to a server. When an app update happens, it would connect to the server first, to check whether any user input existed, and download it from the server. Thus, a complete wipeout of the app during the update process could be circumvented. But I do not think this is a good approach, or is it? – new_to_tizen Sep 25 '19 at 13:16

1 Answers1

3

You can preserve application's setting using tizen.preference.setValue(key, value) and retrieve it by using tizen.preference.getValue(key)

I think this page will be helpful : https://developer.tizen.org/development/guides/web-application/application-management/application-preferences?langredirect=1

UkFLSUI
  • 5,509
  • 6
  • 32
  • 47
Yeon
  • 54
  • 1
  • I think it is worth noting if planning to use this Preference API know that's values can only be of a primitive type; string, number, or boolean.. – axa Feb 04 '20 at 06:48