In my android application i use AsyncTask to download the image from internet.
I pass the url and my AsyncTask does the download. But how do i return the bitmap back to my activity. Currently i pass the callback function to my asynctask constructor and in the OnPostExecute i invoke the callback function. Is this the correct way to do it.
The result you return from
doInBackgroundis passed toonPostExecuteso simple return the bitmap fromdoInBackgroundmethod and handle it inonPostExecute.