This question is locked. New answers and comments are not allowed.
Hello,
I want my app content to be often up to date.
So i plan to read my datasource :
- obviously when the app is launched (we dont need to talk about that)
- + every time my user resume to the app after leaving it more then 10 seconds
- + every 10 seconds when my user is in the app
QUESTION 1 : i looked for code do that in the kendo ui mobile documentation but didnt find anything. did i miss something?
QUESTION 2 : I made this code that seem to work like magic, is it the right strategy?
(i obviously dont want my app to make to many calls to telerik backend and slow down or crash)
thank you
document.addEventListener(
'deviceready'
,
function
() {
(
function
poll(){
setTimeout(
function
(){
dataSource.read().then(
function
(){
poll();
}
);
}, 10000);
});
});