Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. RequestQueue queue = Volley.newRequestQueue(this); // this = context
  2.  
  3. // prepare the Auth Get Request
  4. JsonObjectRequest lastFMAuthRequest = new JsonObjectRequest(Request.Method.GET, lastFMKeyURL, null,
  5. new Response.Listener<JSONObject>()
  6. {
  7. @Override
  8. public void onResponse(JSONObject response) {
  9. // display response
  10. Log.d("Response", response.toString());
  11. }
  12. },
  13. new Response.ErrorListener()
  14. {
  15. @Override
  16. public void onErrorResponse(VolleyError error) {
  17. Log.d("Error.Response", error.toString());
  18. }
  19. }
  20. );
  21.  
  22. // add it to the RequestQueue
  23. queue.add(lastFMAuthRequest);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement