Created
November 5, 2014 16:27
-
-
Save Pierry/215b7bc4f1262209cfb1 to your computer and use it in GitHub Desktop.
Volley String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Request a string response from the provided URL. | |
StringRequest stringRequest = new StringRequest(Request.Method.GET, url, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
// Display the first 500 characters of the response string. | |
etUser.setText("Response is: "+ response.substring(0,500)); | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
etPass.setText("That didn't work!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment