Hi,
I'm working on an app which needs to regularly monitor a network share for files. I have a service module checking every 15 seconds using a timer. The problem is that it works well for a while but after some period of time (maybe an hour? not sure) the timer starts behaving unpredictably. Sometimes it fires once a minute, sometimes once every 3 minutes, sometimes 5 or more. The interval changes even though I am not setting the interval to 1, 3 or 5 minutes.
I just read in the documentation that "Timer events will not fire when the activity is paused, or if a blocking dialog (like Msgbox) is visible.". Well, my activity is paused because the interface is not visible - I generally leave it sitting at the home screen. Maybe I'm misunderstanding the documentation as I'm still new to this.
I'm counting on the timer to be running regardless of the UI. Is this the wrong way to do it? If not, how can I get an event to fire at regular intervals?
Thanks.
I'm working on an app which needs to regularly monitor a network share for files. I have a service module checking every 15 seconds using a timer. The problem is that it works well for a while but after some period of time (maybe an hour? not sure) the timer starts behaving unpredictably. Sometimes it fires once a minute, sometimes once every 3 minutes, sometimes 5 or more. The interval changes even though I am not setting the interval to 1, 3 or 5 minutes.
I just read in the documentation that "Timer events will not fire when the activity is paused, or if a blocking dialog (like Msgbox) is visible.". Well, my activity is paused because the interface is not visible - I generally leave it sitting at the home screen. Maybe I'm misunderstanding the documentation as I'm still new to this.
I'm counting on the timer to be running regardless of the UI. Is this the wrong way to do it? If not, how can I get an event to fire at regular intervals?
Thanks.