i am wondering is that possible (best practice) to run two long running query in two different thread using AsyncTask?
my scenario is something like this:
1) Loading data from HttpGet (once it load then load into the listview)
2) Parsing the data into Listview
currently, i am running the doInBackground to do the #1 and on onPostExecute doing the #2
the response is okay but i am thinking is there a way i can make it more faster?
if i go with running two different thread but the question is, will i be able to run another thread (AsyncTask) from onPostExecute?
Thanks,
I am not sure whether it will be any faster, because if you think about it the steps are kinda serial, you need the data retrieval first, followed by parsing and then showing the data in listview.
So the AsyncTask would only help u in avoiding the ANR. You can always do ure parsing in another AsyncTask. But it wont make the whole cycle any faster.