×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jan 2006
    Location
    CPH, Denmark
    Posts
    64

    Thumbs up Idle screen and ajax requests

    Hi

    I am currently working on a widget that updates a homescreen widget with the latest posts from a rss-feed using a standard xmlhttprequest.
    Everything works perfectly in the emulator - the widget updates itself every five minutes with new posts from the feed, and it is shown on the homescreen as intended.

    The problem arises when I test it on a N97 - apparently the phone blocks/queues the xmlhttprequest when the phone goes to sleepmode or I enter the menu (in other words, when the homescreen widget loses focus). As soon as I "wake up" the phone or goes to the homescreen, it activates the widget and the pending xmlhttprequest is processed.

    Can someone please confirm this behavior? I can't find any documentation about this anywhere. It really is an issue, because the network connection times out after 15 minutes, and then the widget can't update itself.

    Br.

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    9

    Re: Idle screen and ajax requests

    This is standard behaviour. The widget timers get suspended when the widget is in the background. You can update the widget with the onshow() events when the homepage get shown.

    See Web Developers Library

  3. #3
    Regular Contributor
    Join Date
    Jan 2006
    Location
    CPH, Denmark
    Posts
    64

    Re: Idle screen and ajax requests

    Okay, thanks :-)I wonder why i've havent read anything about this behavior in the docs.. I'll take a look at this event - it may solve the issue!

    Best regards
    Mads

Posting Permissions

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