Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User upsite's Avatar
    Join Date
    Jul 2009
    Posts
    1
    Hi,

    I'm working on a wrt widget which is running on the homescreen.
    Every 60 minutes updates are pulled from the internet using an Ajax.send() request.
    But after the first connect the connection isn't disconnected although there are no more requests.

    How can I tell the phone that i don't need the network connection until the next request.
    Staying connected is purging my battery especially when connected through wifi/3g.

    Thanx
    upsite

  2. #2
    Super Contributor Maveric's Avatar
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,102
    Hello upsite,

    What comes to finding out what the status is with the network (ConnectionStatus) as well as the network connection type, please have a look at this article:

    http://wiki.forum.nokia.com/index.ph...n_a_WRT_widget

    When the user has been requested to accept network connection, then it's from the HomeScreen widget's point of view merely keeping the widget updated periodically. Dropped network connection would result in asking the user the request again depending on users preferences or initial answer to option whether to allow only once or for session. You would not much be able to handle disconnecting/connecting at will.


    Updating the homescreen content
    The homescreen does not offer any interactivity with the user. The only interaction with a homescreen portion
    of a widget is launching the full view of the widget. However, dynamic content can be introduced to the
    homescreen view by updating the view, for example by timer. Basically, the homescreen view should show a
    subset of the widget?s most important information. This might be, for example, the local forecast from a
    weather widget, or upcoming appointments from a calendar widget. It is recommended to remove any
    continuously updating media, such as video and flash animation.
    What you can do is implement a timer to update important data to the homescreen. A timer event can, for
    example, trigger network operations, parse data, or simply select some other already-gathered information.
    Keep in mind, however, that data updates may not always be consistent due to suspended network access
    caused by phone calls, low battery, and so on. See section "Informing the widget of online/offline status" to
    better handle situations, when a network connection is not available. However, the APIs described in that
    chapter are only for limited set of devices, and do not let you re-activate a network access. They are ment to
    give you feedback about the network access status for a better fallback handling in case of an error. I

    // Start the timer, which refreshes the homescreen view.
    var refreshRate = 30000;
    var self = this;
    this.timerId = setInterval( function(){
    self.refresh();
    }, refresh );

    Best Regards,
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

Similar Threads

  1. Widget transparancy on Homescreen and in general?
    By phanthomas in forum Symbian Web Runtime
    Replies: 5
    Last Post: 2012-07-14, 18:00
  2. add widget or app to N97 homescreen programatically
    By djscorpion83 in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2009-09-22, 01:39
  3. homescreen widget publishing
    By gavrix in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-08-25, 08:55
  4. Moving from standard widget to homescreen widget
    By Elsterap in forum Symbian Web Runtime
    Replies: 1
    Last Post: 2009-08-06, 04:45
  5. what is a homescreen widget ?
    By yosr eman in forum General Development Questions
    Replies: 4
    Last Post: 2009-03-04, 14:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved