Android: Asynctask, Onpostexecute Starts Before Doinbackground Has Finished
I had this problem a few hours ago (Android: AsyncTask, my 1st task has not finished when the other starts) I put it as solved but then I realized I had a similar problem. Here is
Solution 1:
So the problem is you are timing future runnables for future execution, and then returning from the doInBackground - which immidiatly activates your onPostExecute function.
a solution to your problem is not to use the onPostExcute but instead to time another Runnable with the code you want to run after all the others, since they all run on the same thread this should solve your problem.
Post a Comment for "Android: Asynctask, Onpostexecute Starts Before Doinbackground Has Finished"