StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
// do something
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// do something
}
});