If you really need to use AsyncTask inside an IntentService, you can create a method in your AsyncTask that calls doInBackGround and onPostExecute. Something like that:
void executeFlowOnBackground(Params params) { onPostExecute(doInBackground(params)); }
In my case, I did this because the entire application request was made by a class that extended AsyncTask, and because of the implementation, it was difficult to reorganize the code.
source share