You should fill your return from your doInBackground
with the objects you wish your OnPostExecute
need. For example:
protected List<String> doInBackground(String... aurl) {
List<String> list = new ArrayList<String>();
try {
File root = Environment.getExternalStorageDirectory();
...
list.add(aurl[0]);
list.add(aurl[1]);
list.add(aurl[2]);
list.add(aurl[3]);
} catch (Exception e) {
Log.d("Downloader", e.getMessage());
}
return list;
}
protected void onPostExecute(List<String> list) {
mProgressDialog.dismiss();
for (String url : list) {
// Do you handling here
}
}
You should declare your AsyncTask
like this:
public class MyAsyncTask extends AsyncTask<Void, Void, List<String>> {