android Volley how to post multiple parameters

后端 未结 1 1176
天涯浪人
天涯浪人 2021-01-25 03:41

how to post multiple parameter android Volley
** post multiple array as like 101,102,103 params.put(\"sessionid\", 101,102,103); //as like **
any other Way



        
相关标签:
1条回答
  • 2021-01-25 04:12

    just use for loops and it works fine.

    @Override
        protected Map<String, String> getParams() throws AuthFailureError {
            Map<String, String> params = new HashMap<>();
            for(int i=0; i < arraylist.size; i++)
            {
            params.put("sessionid["+i+"]",String.valueOf(arraylist.get(i)));
            }
            params.put("EntID", "7");
            params.put("offset", String.valueOf(countView));
            params.put("limit", "10");
            params.put("LastLoginTime", "2016-02-01");
            return params;
        }
    

    arraylist is the list of your sessionid. This works for me.

    0 讨论(0)
提交回复
热议问题