I have scenario where I will have to make six http calls to my server to get the data for six different items. These server calls cant be combined and they are meant to be t
There are many ways you could handle this:
AsyncTask that aggregates the responses from the network tasks.sendEmptyMessageDelayed() every, say, 500ms to a Handler created by your Activity that refreshes the data that has come in from the network tasks and continues to do so until all of the networking results are dealt with.Were it me, I'd probably go with the Handler. To sum up, have your network tasks store the data in some intermediate storage. Send delayed messages to a handler and, within the handleMessage() check for data in the intermediate storage and post updated results. If there are results outstanding, post the delayed message again.