Android AsyncTask - Order of execution

前端 未结 6 1249
醉酒成梦
醉酒成梦 2020-12-30 07:58

I am facing an issue regarding the order of exection of AsyncTasks.

My question is :

Assuming I have 2 implementations of AsyncTask : MyAsyncTask1

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 08:39

    Call 2nd Task in onPostExecute of task 1 as

    @Override
    protected void onPostExecute(String string){//String or whatever u passed
        new MyAsyncTask2 ().execute ();
    }
    

提交回复
热议问题