Skip to content

Instantly share code, notes, and snippets.

View silmood's full-sized avatar

Petter Hdz silmood

  • GDG Androidtitlan
  • Mexico City
View GitHub Profile
@silmood
silmood / PostRequest.java
Last active March 9, 2018 17:16
Volley Singleton
RequestQueue queue = VolleyClient.getInstance(getActivity()).getRequestQueue(); //Obtain the instance
StringRequest volleyRequest = new StringRequest(Request.Method.POST,url, //Change the url parameter
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONArray jsonResponse = new JSONArray(response); // Convert string to JSONArray
//TODO: parse the JSON or whatever