how to execute asynctask code example

Example: asynctask call other asynctask

Is it acceptable to create another asynctask & execute it from the first one?

Yes, but only inside onProgressUpdate() or onPostExecute() 
since these methods runs on the UI thread. 
Therefore, start the second AsyncTask on the UI thread by choosing 
one of the two methods listed above.

I'm wondering what publishProgress() from the second task would even do... 
since it was not started from an Activity?

It does exactly the same thing, since you are starting it from the UI thread.

Tags:

Misc Example