Reputation: 11398
I have an Asynctask and I want in the onPostExecute of that AsyncTask to execute another Asynctask.
my question is how can I use AsyncTask.executeOnExecutor() in this case?
Upvotes: 0
Views: 1218
Reputation: 47817
Create a separate class of AsyncTask
and execute like
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
else
task.execute();
task is an Object
of AsyncTask
Upvotes: 1