Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Productlistcall()
- {
- showpDialog();
- JSONObject jsonParams = new JSONObject();
- if(filter_items!=null)
- {
- try {
- jsonParams.put("typeName", "MANUFACTURER");
- jsonParams.put("typeId", "22");
- jsonParams.put("cityId","308");
- jsonParams.put("sortBy", "productname");
- jsonParams.put("sortOrder", "desc");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- JSONArray array=new JSONArray();
- JSONObject obj=new JSONObject();
- String filtersepid = null;
- System.out.println("FILTER LIST DATA IS NOT NULL");
- for(int i=0;i<filter_items.size();i++)
- {
- filtersepid=filter_items.get(i);
- System.out.println("filtersepid"+filtersepid);
- try {
- obj.put("filterId",filter_items.get(i));
- obj.put("typeName","CAT_ID");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- array.put(obj);
- }
- try {
- jsonParams.put("filter",array.toString());
- } catch (JSONException e) {
- e.printStackTrace();
- }
- }
- else
- {
- try {
- jsonParams.put("typeName", "MANUFACTURER");
- jsonParams.put("typeId", "22");
- jsonParams.put("cityId", "308");
- jsonParams.put("sortBy", "productname");
- jsonParams.put("sortOrder", "desc");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- System.out.println("FILTER LIST DATA IS NULL");
- }
- System.out.println("DRAWER PARAMS" + jsonParams);
- JsonObjectRequest postRequest = new JsonObjectRequest( Request.Method.POST, urls, jsonParams,
- new Response.Listener<JSONObject>() {
- @Override
- public void onResponse(JSONObject response) {....
Add Comment
Please, Sign In to add comment