I want to retrieve the values about health details from server database depends upon the Update Interval Time. Suppose if the user set the interval time is 10 minutes, so the values from the server should be retrieve at every 10 minutes. It’s like a quartz in Spring. I tried Timer and TimerTask, but it needs a event to run. But in my case, there is no event. So, how can i achieve it?
I want to retrieve the values about health details from server database depends upon
Share
Put this on you onCreate() method
Then in the callback, retrieve your data.
Dont forget to reset UPDATE_TIME everytime the user set the interval.