DEPRECATED You want to execute your AsyncTask concurrently on any version of Android OS? You need AsyncTaskExecutor!
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


#VERY OUTDATED, PLEASE DON'T EVER USE THIS Take a look at PriorityJobQueue, RxJava and other libraries for concurrent data processing

##Why use it? Starting with Android Api >= HONEYCOMB AsyncTasks are executed on serial, which means that you could not run 2 or more AsyncTasks concurrently without calling task.executeOnExecutor(...), it is not so easy as you would like to think.

AsyncTask-Executor takes all work for running AsyncTask concurrently on any Android OS version, it is better that using:

} else {

Because AsyncTask.THREAD_POOL_EXECUTOR available only on api >= 11; I`m using my own threadPoolExecutor

###With AsyncTaskExecutor you just need to write:

AsyncTaskExecutor.executeConcurrently(task, params, ...);

And that is all. No errors on Android 2.x, 3.x and 4.x

#####Please, look in to see usage example of AsyncTaskExecutor

###How to import AsyncTask-Executor to your Android Project?

  • Just copy to your Android project! (Simplest way)

  • Or use AsyncTaskExecutor as Android Library Project (Good way, if you want to see javadoc)

  • Or just use .jar file, look at Jar folder to get it (Easy way)

####Do not forget! AsyncTaskExecutor.executeConcurrently() returns executing AsyncTask object and you can do what you want with it. For example, you could cancel running task or anything else you could do with AsyncTask object.