How to return the list generated in AsyncTask to Activity?
My class is LoadStringsAsync:
public class LoadStringsAsync extends AsyncTask<Void, Void, List<String> > { List<String> str; @Override protected void onPreExecute() { super.onPreExecute(); ... } @Override protected List<String> doInBackground(Void... arg0) { ... get content from the internet and fill the list ... } @Override protected void onPostExecute(List<String> str) { super.onPostExecute(events); ... } }
and I need a List in my work to work with it. (No, not to show this in ListView: P)
Any suggestions on how to do this ?:-)
Thanks!
source share