Hello,
Create one class that extends AsyncTask like,
public class QuestionHelper extends AsyncTask<String, String, ArrayList<HashMap<String, String>>>
public QuestionHelper(Context ctx)
{
this.ctx = ctx;
}
and then in other class or activity, go like this
ArrayList<HashMap<String, String>> QuestionsList = new QuestionHelper(getApplicationContext()).execute().get();;