I have developed an Android App which will go live in few days.
I have come across a different problem when testing the app on ICS.
It is working fine on Pre-GingerBread and GingerBread version devices. It is throwing NetworkOnMainThreadException
when tested ICS device and managed to remove that by putting HTTP Calls in AsyncTask
.
But my issue is I am making 4 to 5 different HTTP Url calls
and calling every url require a AsyncTask as these URLs should execute concurrently one after other.
If result of one url is failed next one should not be called and that should updated on UI. So I am taking an AsyncTask
for each URL Call.
Can we have many AsyncTasks
in a Single Fragment or not. As of I Managed to have Maximum 3 AsyncTask
in my Fragment Class.
If so can we start executing another AsyncTask
from first AsyncTask
PostExecute
method.
Thanks in Advance.