Showing posts with label How can I repetitively use an AsyncTask *and* return a result? I am writing an app that accesses a web site. Show all posts
Showing posts with label How can I repetitively use an AsyncTask *and* return a result? I am writing an app that accesses a web site. Show all posts

How can I repetitively use an AsyncTask *and* return a result?



I am writing an app that accesses a web site, downloads XML responses and acts on the response.


I have used the solution discussed at How to get the result of OnPostExecute() to main activity because AsyncTask is a separate class?, but due to the limitation of AsyncTask only being able to run once, I cannot reuse the AsyncTask for reading the next XML response required. Is AsyncTask the solution for me, or should I be writing my own threaded activity?


Read more ...