I did added async library at my project and checked already, I don\'t know why code flow doesn\'t go in to asynctask
Code
public void doMysql()
{
Log
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
I was already doing this and the problem was still there, the problem was I was using AsyncTask
to run long background tasks that do run forever, so the ThreadPoolExecutor
's worker threads were already occupied.
In my case AsyncTask.THREAD_POOL_EXECUTOR
(use debugger to get your executor properties) was having the ff properties:
maximumPoolSize = 3
largetsPoolSize = 2
corePoolSize =2
So disabling one of the long running asyncTasks made my doInBackground code to run but that is not the right solution.
The right solution is I moved long running tasks into custom threads rather than using AsyncTask
.