try { StringRequest stringRequest = new StringRequest(Request.Method.POST, Scan_URL, new Response.Listener<String>() { @Override public void onResponse(String response) { getJsonResponse(response); System.out.println("RESPONSE" + response); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(QRScan_Activity.this, error.toString(), Toast.LENGTH_LONG).show(); } }) { @Override protected Map<String, String> getParams() { Map<String, String> params = new HashMap<String, String>(); params.put("UserID", strUserId); params.put("UserQRCode", Data); params.put("QRLAt",sessionManager.getCurrentLat()); params.put("QRLong",sessionManager.getCurrentLong()); return params; } }; RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(stringRequest); } catch (Exception e) { e.printStackTrace(); }