×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    8

    Record and retrieve data from the mobile widget

    How data is stored using widgets? For example. I remember your preferences for language, sound, score, etc. a widget application.

    Thanks in advance

  2. #2
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Record and retrieve data from the mobile widget

    Hello,

    See setPreferenceForKey();

    -Ilkka

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    4

    Re: Record and retrieve data from the mobile widget

    I try this but to no avail:
    //Store
    widget.setPreferenceForKey(longitude, "longitude");
    widget.setPreferenceForKey(latitude, "latitude");

    //Read
    widget.preferenceForKey(longitude, "longitude");
    widget.preferenceForKey(latitude, "latitude");

    also using JSON but the same result.

    // Store objects to local storage
    var jsonTasks = JSON.stringify( longitude );
    localStorage.tasks = jsonTasks;
    var jsonTasks = JSON.stringify( latitude );
    localStorage.tasks = jsonTasks;

    // Read objects from local storage
    longitude = JSON.parse( localStorage.longitude );
    latitude = JSON.parse( localStorage.latitude );

    Can you show me where did it when wrong?
    Thanks in advance.

  4. #4
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Record and retrieve data from the mobile widget

    Hi,

    Reading is done by only using the key.
    widget.preferenceForKey(String key)

    -Ilkka

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    4

    Re: Record and retrieve data from the mobile widget

    Thanks a lot

  6. #6
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    103

    Re: Record and retrieve data from the mobile widget

    Hi

    For the full detail chek in library.
    http://library.forum.nokia.com/

    Web Developer's Library 2.0 > Symbian Web Runtime API reference > JavaScript widget object

    Regards
    TJ

Similar Threads

  1. Retrieve data from mobile???
    By vipin.mukundan in forum Mobile Java General
    Replies: 8
    Last Post: 2010-08-18, 10:32
  2. retrieve the data from the .XML file
    By jameskittu in forum Symbian C++
    Replies: 2
    Last Post: 2010-05-05, 08:11
  3. Wsdl2CppL2CPP/Soap, how to retrieve the data from WebService
    By hmalpartida in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-07-16, 13:34
  4. Replies: 0
    Last Post: 2007-11-27, 11:15
  5. Did Phone Book Engine able to retrieve the contact data from SMI and Phone?
    By wcpang in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2005-01-17, 13:46

Posting Permissions

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