Created
January 24, 2019 17:17
-
-
Save imammubin/e7b6aea4edec7be83f8091d0cbd7b01f to your computer and use it in GitHub Desktop.
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
private StringRequest stringRequest = new StringRequest(Request.Method.POST, url_register, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
String result = response.toString(); | |
textView.setText(result); | |
Log.d("vol ", "onResponse: "+result); | |
////////// CONVERT STRING TO JSON | |
try { | |
JSONObject stringJSON = new JSONObject(result); | |
String code=stringJSON.getString("code"); | |
textView.setText(code); | |
}catch (Exception e){} | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
String eror = error.toString(); | |
} | |
}){ | |
@Override | |
protected Map<String, String> getParams() { | |
Map<String, String> params = new HashMap<String, String>(); | |
String name = ""; | |
String email = "myemail@gmail.com"; | |
String passwd = "xyz321"; | |
params.put("name", name); | |
params.put("email", email); | |
params.put("passwd", passwd); | |
return params; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment