I've created a generic class to forget in wich version we are. When we create an AsyncTask we always extends of AsyncTaskThreadPool. Hope it helps you!
public abstract class AsyncTaskThreadPool<T1, T2, T3> extends AsyncTask<T1, T2, T3> {
public void ExecuteThreadPool(T1 param)
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
this.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, param);
} else {
this.execute(param);
}
}
protected abstract T3 doInBackground(T1... params);
}