×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    35

    Question How to store settings so that they survice reinstalls or updates?

    According to the documentation, settings stored with the setPreferenceForKey() method are lost during reinstalls or updates:

    The preference value for the key is stored persistently, so if the widget or device is restarted, the value is retained. However, the values stored by a widget are removed when a widget is uninstalled from the device. This includes the case when a widget is reinstalled; where the old widget is uninstalled, the new widget is installed.
    How can I store settings so that they will not be deleted when updating the widget? It's pretty annoying for widgets that offer a lot of customizations which you'd have to reconfigure everytime you install an update.

    According to this thread, cookies don't work properly.

    Any suggestions?

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: How to store settings so that they survice reinstalls or updates?

    Hi oxidative,

    as from my experience, I've found 3 ways to accomplish this:

    1) Using API Bridge, and implementing a custom plugin that allows your widget to write a file on the local device filesystem

    2) Use an alternative widget's update mechanism: http://wiki.forum.nokia.com/index.ph..._a_new_version

    3) When the widget is notified of an updated version (so, you have to implement a "check for updates" functionality), you send the stored data to a remote server just before starting to download/install the new widget. Once the new widget starts, you read back the data stored on the remote server and restore the local preferences.

    Hope it helps,
    Pit

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    35

    Re: How to store settings so that they survice reinstalls or updates?

    The methods above all have disadvantages. You either need network access, have to install additional dependencies or can't update all widget ressources.

    I just came up with two ideas: clipboard and Calendar for data storage.

    I know that using the clipboard is problematic on the desktop (very browser handles it differently), but maybe Symbians browser has support for it?

    The other possibliliy would be the calendar. The current api allows you to create new events. That could be used to store information, maybe in a seperate calendar database file (should be possible, at least according to the docs).

Similar Threads

  1. WAP settings
    By seaver in forum Smart Messaging
    Replies: 1
    Last Post: 2003-03-18, 11:37
  2. WAP settings problem
    By seaver in forum General Messaging
    Replies: 0
    Last Post: 2003-03-11, 11:53
  3. How to send complete email settings?
    By kick121 in forum Smart Messaging
    Replies: 2
    Last Post: 2003-02-26, 05:48
  4. Problem sending GPRS settings
    By maronk in forum Smart Messaging
    Replies: 1
    Last Post: 2002-09-24, 06:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×