×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    how update homescreen contents automatically?

    Hi,
    I have a widget that should update every day.

    timer = setInterval("tick()", 1000 * 60 * 60);

    This should be ok, if I read the documentation. Unfortunately, I read also, that the widget must be visible, else the timer stops working.

    So, the widget has to be visible for 1 hour after the timer emit the signal.

    But after 30 seconds, the screensaver stops the time and the homescreen is updated only after some days (right?).

    There are a lot of daily widgets on the store, that doesn't update the content.

    A workaround is to write:
    timer = setInterval("tick()", 5000);
    and in tick() function I test if the current day is like the day where the widget was updated the last time.

    Is there a better solution?

    Thanks! Tiger54
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

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

    Re: how update homescreen contents automatically?

    Hi,

    You are correct about how timers do work in WRT widgets and indeed there are widgets that use way too long timer values.

    I would recommend on using timestamps to determine if widget should retrieve newest data.
    http://www.developer.nokia.com/Commu...screen_content

    A good place to check the timestamp, and update the contet, would be when widget onshow() occurs.
    Timers are good for rotating the content in home screen after the data has been fetched.

    Br,
    Ilkka

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: how update homescreen contents automatically?

    Thank you Isalento!
    That was exactly was I was missing in my widget.

    widget.onshow solved my problem
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

Similar Threads

  1. Homescreen not working on 5800 since software update
    By firebladegriff in forum General Development Questions
    Replies: 1
    Last Post: 2010-06-11, 04:03
  2. why is it that there is still no update for nokia 5800 update for product code 058315
    By jamonserrat in forum Series 40 & S60 Platform Feedback Archive
    Replies: 7
    Last Post: 2010-04-26, 10:01
  3. Replies: 0
    Last Post: 2008-12-28, 21:21
  4. Update contents on a MIDlet
    By Rodrigo82 in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2007-01-18, 16:10
  5. how can I automatically update a wap page?
    By TBieding in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2003-04-17, 06:19

Posting Permissions

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