Search This Blog

Tuesday, July 16, 2013

Ecxecute two Different AsyncTask parallel in android

If you want to ecxecute the two different asynctask to be ecxecute parallelly then you shoul use the second async task ecxecution like below.  UpdateCoin is the Async task.         

   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
new UpdateCoin().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
mPref.getInt("UserCoin", 0), CalculatedCoin);
} else {
new UpdateCoin().execute(mPref.getInt("UserCoin", 0), CalculatedCoin);
}