I have a volley StringRequest using the POST method, the request is able to connect to the server in both device and emulator but, the request needs to have the parameters in the correct order for it to work, and for some reason, the emulator does send those parameters in order but the device does not.
Why is this? Is there something i can do to avoid this?
My StringRequest:
StringRequest xx = new StringRequest(Request.Method.POST, getAjaxUrlForFunction("Login"), new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.w("RESPONSE-=",response);
callback.onSucces(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
error.printStackTrace();
callback.onError(error);
}
}){
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String,String> paramss = new HashMap<String, String>();
paramss.put("funcion","login");
paramss.put("ajax_request","controller");
paramss.put("args[0]", name);
paramss.put("args[1]", password);
return paramss;
}
};