execute()
call returns an AsyncTask
instance, you can save this instance for verification later if the task is completed or not by calling getStatus()
, so your code will look like this:
final AsyncTask<...> first_task; final AsyncTask<...> second_task; public someMethod() { first_task = new MyFirstAsyncTask().execute(); second_task = new MySecondAsyncTask().execute();
and a task that ends last can start a new task to combine the results.
source share