Question: I have an activity object, myAct. myAct creates and calls my httpGetter object which extends AsyncTask

httpGetter does a great job! My progress bars work great. It gets the HTML data. I put a toast in the httpGetter.onPostExecute..... There's the HTML!!!!

How do I pass that data back to the activity from the onPostExecute? I don't even know what to google for this. I tried a few things, and all of the examples I saw either updated a textView or just showed the data in a toast, right in the onPostExecute. I want to resume things back in the calling Activity. In my httpGetter class, I created a method to set a handle to the calling Activity thinking I could call a method with the result String. No luck.

Answer: 
OK, so a bit more googling came up with the following solution.

myAct needed an interface

```
   public interface WebServiceListener 
{
    public void onHTTPGetComplete (ArrayList<String> arrayList);
}
public void onHTTPGetComplete  (ArrayList<String> arrayList) {
      String Response = arrayList.get(0);
      Toast worked = Toast.makeText(mainPage.this, Response, Toast.LENGTH_LONG);
      worked.show();
}

```

and the Async in the onPostExecute needed to call it 

> 
> listener.onHTTPGetComplete (myList);
> 
> 
>
How about sending an intent from httpGetter to myAct with intent.putExtra() to pass back your data? For this to work, you'll need to let httpGetter know about myAct's context when you create the AsyncTask.