Do you know that android version higher than gingerbread doesn't support multiple async task to run parellely but gingerbread ans lower version supports this functionality.
So if you want to run multiple task at a time you have to check api version and then apply Executor service named Thread pool executor service that makes pools of service and runs them parellely.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
new task().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, param);
} else {
new task().execute(param);
}
0 Comment(s)