I'm sending a JSONArray GET request with Volley, and it's returning the specified JSON array. Here's my Request:
JsonArrayRequest getRequest = new JsonArrayRequest(url,
new Response.Listener<JSONArray>()
{
@Override public void onResponse(JSONArray response) {
Log.d("Response", response.toString());
}
},
new Response.ErrorListener()
{
@Override public void onErrorResponse(VolleyError error) {
Log.d("Error.Response", error.toString());
}
}
);
VolleySingleton.getInstance(this).addToRequestQueue(getRequest); //Call to get dashboard feed
}
As you can see, I'm currently just logging out the response. I want to parse the Array though and display the results in a list view. The documentation for this isn't great, and I'm pretty green in terms of Android dev. What is the proper way to parse a JSON array from Volley and display the results in a list view? I've gathered that I should use parseNetworkResponse
, but not sure how to implement.