Async Task in a loop

Posted by Ankuj on Stack Overflow See other posts from Stack Overflow or by Ankuj
Published on 2012-10-29T04:20:24Z Indexed on 2012/10/29 5:02 UTC
Read the original article Hit count: 95

Filed under:
|

How does one create an AsyncTask which keeps running itself after a fixed interval of time.

For eg. get data from server every 5 minutes and give notification to caller thread that it has received the data. I searched on the forum but could not find much. What I have gathered so far is that

1) A UI thread will call AsyncTask

2) onPrExecute for UI thread access before executing

3) OnPostExecute for UI thread access after executing

I dont need to show any progress update to the user. Also, the task will be destroyed when the app closes. Any tutorial for this will he helpful

© Stack Overflow or respective owner

Related posts about android

Related posts about android-asynctask