Software Archive
Read-only legacy content
17061 Discussions

timer refresh on rss service method

maxlinux2000
Beginner
235 Views

Hi all,

I'm writing a simple rss feed reader with xdk 1995.

Now I have this problem: In the build installed on my phone, the feeds are not refreshed quickly. 

So I want to add a timer that force the refresh every 10 minuts... but, how can I, force the refresh to the rss service integrated in the xdk?

 

regards,

MaX

0 Kudos
1 Reply
Chris_P_Intel
Employee
235 Views

When you created the service binding you defined a function that is the call to the service. If you used that service in the Design view, then anytime that function is called, the UI will update.

So, simply use setInterval (built in JS command) to call that function repeatedly. ( https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval )

setInterval(intel.xdk.my_service_binding, 1000 * 10); //1000 ms times 10 seconds

 

0 Kudos
Reply