I am getting data from the server using AsyncTask
. I need to update the data periodically.
Whats the best way to do it?
See Question&Answers more detail:osI am getting data from the server using AsyncTask
. I need to update the data periodically.
Whats the best way to do it?
See Question&Answers more detail:osYou could use Timer class to schedule periodic task using TimerTask instead of AsyncTask
See :
http://developer.android.com/reference/java/util/Timer.html
http://developer.android.com/reference/java/util/TimerTask.html
And to update your UI you should follow this good tutorial :
http://android-developers.blogspot.com/2007/11/stitch-in-time.html