0

Problem with Web service calls repeated with timer on TV

Hi,

I am trying to call a web service repeatedly over a few minutes in the sidebar. This works in the simulator. But, when I test the widget on a TV, the web service is either called a couple of times or not at all. I am using LG TV. What might be the issue?

I am using KONtx.utility.timer.setTimeout. I am aware that setInterval is the method for repeated calls, but the widget is designed in such a way that setTimeout will be called recursively. As I have already mentioned, it works in the simulator. The general format of the code is as follows.

CODE
function asyncCallbackMethod(response){
//code to process the response data
var timer = KONtx.utility.timer.setTimeout(function(){
//code to call the webservice
}, 300000);
}


Thanks,
Icarus

by
1 Reply
  • QUOTE (Icarus @ Feb 15 2011, 05:43 AM) <{POST_SNAPBACK}>
    Hi,

    I am trying to call a web service repeatedly over a few minutes in the sidebar. This works in the simulator. But, when I test the widget on a TV, the web service is either called a couple of times or not at all. I am using LG TV. What might be the issue?

    I am using KONtx.utility.timer.setTimeout. I am aware that setInterval is the method for repeated calls, but the widget is designed in such a way that setTimeout will be called recursively. As I have already mentioned, it works in the simulator. The general format of the code is as follows.

    CODE
    function asyncCallbackMethod(response){
    //code to process the response data
    var timer = KONtx.utility.timer.setTimeout(function(){
    //code to call the webservice
    }, 300000);
    }


    Thanks,
    Icarus

    There's no reason why this code should fail on LG. If it were me, I'd start remote logging the http requests to a server to see what the headers and data are. The easiest way to do that would be to send a request to a server you own and tail the logs. I'd also decrease the timer so I'm not waiting 5 minutes for it to fire.

    Also, if polling, I'd use a setInterval and send the request within that rather than creating a new timer each time in the request's callback.
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets