I have the following class:
public class getURLData extends AsyncTask{
@Override
protected String doInBackground(String... pa
Add a context parameter to task's constructor which would refer to object where you'd store resulting data.
class PopulateArray extends AsyncTask>
{
Context _context; // context may be what ever activity or object you want to store result in
PopulateArray(Context context)
{
_context = context;
}
@Override
protected ArrayList doInBackground(Integer... integers)
{
ArrayList data = new ArrayList();
//manipulate
return data;
}
@Override
protected void onPostExecute(ArrayList strings)
{
_context.setData(strings);
}
}