2 AsyncTask Does Not Run Asynchronously In Android

Well, here’s the thing. The execute() method of AsyncTask were first introduced to execute serially on a single background thread.

Then it was changed to a pool of threads allowing multiple tasks to operate in parallel beginning with Android Donut OS.

With HoneyComb, tasks are executed on a single thread to avoid common application errors caused by parallel execution.

So if you want to run 2 or more tasks asynchronously, you use the method executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

If your app supports older versions prior to HoneyComb, you can do this kind of check:

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *