I've used setTags when making a google volley request. How do you use getTag or other method in the in-line onResponse or a response listener?
public boolean VolleyRequestWrapper(final int which, String url, final String volleyTag) {
JsonObjectRequest jsonObjReq = null;
jsonObjReq = new JsonObjectRequest(
Method.GET,
url,
null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
??????.getTag(); // <----- THIS IS WHERE I WANT TO get the Tag.
}
}, new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
VolleyLog.d(volleyTag, "Error: " + error.getMessage());
volleyException = true;
}
});
// Adding request to request queue
jsonObjReq.setTag(volleyTag); // I can set the tag
requestQueue.add(jsonObjReq);
return !volleyException;
}
I've looked but haven't found a good example that uses getTag and I haven't found an documentation on volley. Any help would be appreciated.
Have a great day.