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);
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.