I have a problem with the AsyncTask. Sometimes the doInBackground() method is not called after onPreExecute().
I know this questio
Finaly I found a solution to the problem.
Instead of execute the asyncTask with the *AsyncTask.THREAD_POOL_EXECUTOR*, I instanciate my own ThreadPoolExecutor with a large corePoolSize and maximumPoolSize:
int corePoolSize = 60;
int maximumPoolSize = 80;
int keepAliveTime = 10;
BlockingQueue workQueue = new LinkedBlockingQueue(maximumPoolSize);
Executor threadPoolExecutor = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, TimeUnit.SECONDS, workQueue);
And ...
asyncTask.executeOnExecutor(threadPoolExecutor);
I don't know if this is a good bugfix but with this, doInBackground() is always called. As you said, I supose that the problem was that *AsyncTask.THREAD_POOL_EXECUTOR* could not manage as much asyncTasks as I gave to it.
Thank you guys