Basic StringRequest using GET method

suggest change
final TextView mTextView = (TextView) findViewById(;

// Instantiate the RequestQueue.
RequestQueue queue = Volley.newRequestQueue(this);
String url ="";

// Request a string response from the provided URL.
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
            new Response.Listener<String>() {
    public void onResponse(String response) {
        // Display the first 500 characters of the response string.
        mTextView.setText("Response is: "+ response.substring(0,500));
}, new Response.ErrorListener() {
    public void onErrorResponse(VolleyError error) {
        mTextView.setText("That didn't work!");
// Add the request to the RequestQueue.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents