Monday, June 10, 2013

[android help] Where does control return to after onPostExecute() method of AsynchTask?


Where does control return to after onPostExecute() method of AsynchTask?



I have an AsynchTask which is called from with in a function in my MainActivity. After the onPostExecute method is executed ,the control doesn't seem to return to the function where I called the AsynchTask.



class AsynchTestClass extends AsynchTask{
protected int doInBackGround(Integer i){
return i + 10;
}

protected void onPostExecute(Integer r){
doCalculation(r);
}
}

//calling function in Main Activity.
public void showResult()
{
new AsynchTestClass.execute(20);
//Want to continue here, but control doesn't seem to return.
}


The code I write after the new AsynchTestClass.execute(20) doesn't execute. How do I continue after the AysnchTask returns.



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...