Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

onPostExecute not called after completion AsyncTask

For some reason my onPostExecute() is not called after my AsyncTask finishes.

My class decleration:

public class setWallpaperForeground extends AsyncTask<String, Integer, Boolean>

My onPostExecute():

protected void onPostExecute(Boolean result)

Everything works fine, my doInBackground() completes successfully and returns a Boolean but then it just finishes.

Thanks

like image 648
mlevit Avatar asked Aug 31 '10 06:08

mlevit


1 Answers

Did you start the task with execute() method? The onPostExecute wouldn't run if you just invoke the doInBackground.

like image 121
Konstantin Burov Avatar answered Sep 21 '22 23:09

Konstantin Burov