Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RequestQueue queue = Volley.newRequestQueue(this); // this = context
- // prepare the Auth Get Request
- JsonObjectRequest lastFMAuthRequest = new JsonObjectRequest(Request.Method.GET, lastFMKeyURL, null,
- new Response.Listener<JSONObject>()
- {
- @Override
- public void onResponse(JSONObject response) {
- // display response
- Log.d("Response", response.toString());
- }
- },
- new Response.ErrorListener()
- {
- @Override
- public void onErrorResponse(VolleyError error) {
- Log.d("Error.Response", error.toString());
- }
- }
- );
- // add it to the RequestQueue
- queue.add(lastFMAuthRequest);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement