I'm learning to program by myself and I am facing a problem which I believe is easy to solve.
I'm making requests using Google Volley and like to know how I store the information coming in the request for me to work with them in my onCreate.
public void parseJSON(){ StringRequest getRequest = new StringRequest(Request.Method.GET,activity.getString(R.string.URL), new Response.Listener() { @Override public void onResponse(String response) { I need to store the data for use in the method onCreate. }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.e("Error.Response", error.toString()); } }); request.add(getRequest); }
I do not know how to pass the data of this separate method to main.
I'm starting alone and has researched a lot, but found nothing with this simple problem.
Thank you anyway!