use of dz.easy.androidclient.Util.CustomRequest in project easy by MehdiBenmesa.
the class NoteService method putNoteStudent.
private void putNoteStudent(final JSONObject dataToSend) {
CustomRequest jsonReq = new CustomRequest(Request.Method.POST, POST_NOTE, null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// hidepDialog();
}
}) {
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new HashMap<String, String>();
try {
params.put("reason", dataToSend.getString("reason"));
params.put("value", dataToSend.getString("note"));
params.put("student", dataToSend.getString("student"));
params.put("module", dataToSend.getString("_id"));
params.put("modulename", dataToSend.getString("_name"));
} catch (JSONException e) {
e.printStackTrace();
}
return params;
}
};
App.getInstance().addToRequestQueue(jsonReq);
}
use of dz.easy.androidclient.Util.CustomRequest in project easy by MehdiBenmesa.
the class TimeTableManagerAdapter method getAllGroups.
public void getAllGroups() {
CustomRequest jsonReq = new CustomRequest(Request.Method.GET, GET_ALL_GROUPS, null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
App.getInstance().addToRequestQueue(jsonReq);
}
Aggregations