Created
June 16, 2014 08:51
-
-
Save Jaymo/c010ee1da79e44cb5efa to your computer and use it in GitHub Desktop.
Volley: passing parameters in a string request
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
StringRequest loginReq = new StringRequest(Method.GET, | |
URL, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
respnse=response; | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
respnse="-1"; | |
} | |
}){ | |
@Override | |
protected Map<String, String> getParams() { | |
Map<String, String> params = new HashMap<String, String>(); | |
params.put("type","register"); | |
params.put("name",fname+" "+lname); | |
params.put("number",phone); | |
params.put("password",pass); | |
return params; | |
} | |
}; | |
PesaBoxApplication.getInstance().addToRequestQueue(loginReq, tag_signupReq); | |
return respnse; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, String object was helpful. I cant get volley to pick up parameters from getParams.