Como implementar o JsonArrayRequest usando o Volley lib do google?

Eu usei o método getParams (), mas não sei como usar o método JsonArrayRequest. Eu acho que é assim que parece.

JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.POST, INVEST_URL, itemSelectedJson, new Response.Listener() { @Override public void onResponse(JSONArray response) { } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { } }); RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(jsonArrayRequest); 

O código abaixo mencionado cria um JsonArray.

  private void selectedItems() { billType = (invEstSwitch.isChecked() ? textViewEstimate : textViewInvoice) .getText().toString(); itemselected.put("custInfo", custSelected.toString()); itemselected.put("invoiceNo", textViewInvNo.getText().toString()); itemselected.put("barcode", barCode.getText().toString()); itemselected.put("desc", itemDesc.getText().toString()); itemselected.put("weight", weightLine.getText().toString()); itemselected.put("rate", rateAmount.getText().toString()); itemselected.put("makingAmt", makingAmount.getText().toString()); itemselected.put("net_rate", netRate.getText().toString()); itemselected.put("itemTotal", itemtotal.getText().toString()); itemselected.put("vat", textViewVat.getText().toString()); itemselected.put("sum_total", textViewSum.getText().toString()); itemselected.put("bill_type", billType); itemselected.put("date", textViewCurrentDate.getText().toString()); //Add the map to the Array itemSelectedJson.put(itemselected); index++; } 

Esta é a matriz json que é gerada.

[“{custInfo = Ujwal 9975022560, taxa = 24000, peso = 21.00000, desc = GENTES ANGTHI 22k NO STONE, makingAmt = 200, vat = RS.3064.38, itemTotal = 51073, sum_total = RS.156283.38, código de barras = BQSP78BB, net_rate = 24200, data = 2015-11-30, invoiceNo = 1, bill_type = Fatura} “,” {custInfo = Ujwal 9975022560, taxa = 24000, peso = 21.00000, desc = GENTES ANGTHI 22k NO STONE, makingAmt = 200, vat = RS .3064.38, itemTotal = 51073, sum_total = RS.156283.38, código de barras = BQSP78BB, net_rate = 24200, data = 2015-11-30, invoiceNo = 1, bill_type = Fatura} “,” {custInfo = Ujwal 9975022560, rate = 24000, peso = 21.00000, desc = GENTS ANGTHI 22k NO STONE, makingAmt = 200, vat = RS.3064.38, itemTotal = 51073, sum_total = RS.156283.38, código de barras = BQSP78BB, net_rate = 24200, date = 2015-11-30, invoiceNo = 1, bill_type = Factura} “]

Por favor, me dê alguns conselhos sobre como usar o volley lib e analisar esse tipo de matriz json no Android.

Este é o código getParams que eu estava usando para inserir um detalhe de item no database.

  @Override protected Map getParams() throws AuthFailureError { Map params = new HashMap(); params.put(KEY_CUSTINFO, custInfo); params.put(KEY_INVOICENO, invoiceNo); params.put(KEY_SBARCODE, barcode); params.put(KEY_DESC, desc); params.put(KEY_WEIGHT, weight); params.put(KEY_RATE, rate); params.put(KEY_MAKINGAMT, makingAmt); params.put(KEY_NETRATE, net_rate); params.put(KEY_ITEMTOTAL, itemTotal); params.put(KEY_VAT, vat); params.put(KEY_SUMTOTAL, sum_total); params.put(KEY_BILLTYPE, bill_type); params.put(KEY_DATE, date); return params; } @Override protected String getParamsEncoding() { return super.getParamsEncoding(); } }; RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(stringRequest); 

Este é o meu código php