I want to get data from 3 different rest calls in a single activity. How can I do this using asynctasks. How can I co-ordinate 3 tasks?
Update: What I want to do is to wait for all the three tasks to complete before updating UI.
I want to get data from 3 different rest calls in a single activity. How can I do this using asynctasks. How can I co-ordinate 3 tasks?
Update: What I want to do is to wait for all the three tasks to complete before updating UI.
You can refer to this post
Running multiple AsyncTasks at the same time — not possible?
AsyncTask uses a thread pool pattern for running the stuff from doInBackground(). The issue is initially (in early Android OS versions) the pool size was just 1, meaning no parallel computations for a bunch of AsyncTasks. But later they fixed that and now the size is 5, so at most 5 AsyncTasks can run simultaneously. Unfortunately I don't remember in what version exactly they changed that.