0
@Override
protected Map<String, String> getParams() throws AuthFailureError {
    Map<String, ArrayList<String>> map = new HashMap<String,ArrayList<String>>();
                      map.put("title",interest);
              return map;
    }
};

I am trying this way but I know this is possible only for string not arraylist

Milo
  • 3,365
  • 9
  • 30
  • 44
tech
  • 1
  • Why do you want to avoid using JSON? It's a standard class [in the android API](https://developer.android.com/reference/org/json/JSONObject.html).. Without sending json you're pretty much going to be sending a lot of GET/POST requests which isn't going to be kind on Java I think – IsThisJavascript Mar 12 '18 at 16:50
  • If you manage to change your mind on the whole JSON thing; take a read of this solution https://stackoverflow.com/questions/28344448/how-to-send-json-object-to-server-using-volley-in-android as that may be the answer you're looking for – IsThisJavascript Mar 12 '18 at 16:51
  • What kind of array list? Please put in your post example. Also show how your php script looks like as both should be compatible. – greenapps Mar 12 '18 at 18:17

1 Answers1

0
String key = "phpArray[]";

JSONArray jsonArray = new JSONArray();
jsonArray.put(1);
jsonArray.put(2.3f);
jsonArray.put("Four");
jsonArray.put(true);

map.put(key, jsonArray.toString());
  • While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-‌​code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. – Rosário Pereira Fernandes Mar 12 '18 at 19:39