title: display specific details related to id using volley
body: <p>I am dynamically loading buttons in 1 activity and onClick() event of the button next activity is loaded. In the below activity I want to display details related to the buttons i.e if user clicks QUEST it should display only QUEST details and if user clicks SRL it should display only SRL details. I am unable to get. Can anyone help? </p>
  
  <pre><code>public void loadDescriptionList() {
      String url = "https://diagnostic.hisaabwaale.in/AndroidAppController/testGet";
      final ProgressDialog progressDialog = new ProgressDialog(TestDetails.this);
      progressDialog.setMessage("Loading Data...");
      progressDialog.show();
      StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      progressDialog.dismiss();
                      try {
                          obj = new JSONObject(response);
                          heroArray = obj.getJSONArray("list");
                          for (int i = 0; i &lt; heroArray.length(); i++) {
                              heroObject = heroArray.getJSONObject(i);
                              TDescription hero = new TDescription(heroObject.getString("test_code"), heroObject.getString("test_description"), heroObject.getString("test_price"));
                              heroList.add(hero);
                          }
                          adapter = new ListViewAdapter(heroList, getApplicationContext());
                          listView.setAdapter(adapter);
                      } catch (JSONException e) {
                          progressDialog.dismiss();
                          e.printStackTrace();
                          Toast.makeText(getApplicationContext(), "No Records Found", Toast.LENGTH_LONG).show();
                      }
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      progressDialog.dismiss();
                      Toast.makeText(getApplicationContext(), "No Records Found", Toast.LENGTH_LONG).show();
                  }
  
              }) {
          @Override
          protected Map&lt;String, String&gt; getParams() {
              Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("franchise", franchise);
              return params;
          }
      };
      RequestQueue requestQueue = Volley.newRequestQueue(this);
      requestQueue.add(stringRequest);
  }
  </code></pre>
  
  <p>Backend api</p>
  
  <pre><code>  function testGet(){
    $response = array();
    $franchise = $this-&gt;input-&gt;post('franchise');
    $result = $this-&gt;testModel-&gt;testlist($franchise);
    if($result != 0){
      $response['status'] = 200;
      $response['list'] = $result;
    }else{
      $response['status'] = 201;
      $response['msg'] = 'No Records';
    }
    echo json_encode($response);
  }
  </code></pre>
  
  <p>this is the model</p>
  
  <pre><code>public function testlist($franchise)
  {
      $query = "SELECT t.id, t.franchise_id, t.test_code, t.test_description, t.test_price
              FROM `".$this-&gt;table."` as t
              WHERE t.franchise_id = ".$franchise;
     $result = $this-&gt;db-&gt;query($query);
     if($result-&gt;num_rows() &gt; 0){
       return $result-&gt;result();
     }else{
       return 0;
     }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>LOGCAT</strong></p>
  
  <pre><code>12-22 00:24:34.459 22632-22632/hisaabwaale.in.hisaabwaale E/MultiWindowProxy: getServiceInstance failed!
  </code></pre>
  
  <p>12-22 00:24:37.574 22632-22632/? E/MultiWindowProxy: getServiceInstance failed!
  12-22 00:24:37.696 22632-22632/? E/MultiWindowProxy: getServiceInstance failed!
  12-22 00:24:38.637 22632-22863/? E/NativeCrypto: ssl=0xacc22880 cert_verify_callback x509_store_ctx=0x9f0f9e4c arg=0x0
  12-22 00:24:38.637 22632-22863/? E/NativeCrypto: ssl=0xacc22880 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
  12-22 00:24:40.080 22632-22664/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0921dc0
  12-22 00:24:40.111 22632-22632/? E/Error: Failedorg.json.JSONException: Index 2 out of range [0..2)
  12-22 00:24:40.255 22632-22664/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0921640
  12-22 00:24:55.343 22632-22632/? E/MultiWindowProxy: getServiceInstance failed!
  12-22 00:24:55.452 22632-23164/? E/Volley: [125517] NetworkDispatcher.run: Unhandled exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
                                             java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
                                                 at libcore.net.UriCodec.encode(UriCodec.java:132)
                                                 at java.net.URLEncoder.encode(URLEncoder.java:57)
                                                 at com.android.volley.Request.encodeParameters(Request.java:484)
                                                 at com.android.volley.Request.getBody(Request.java:470)
                                                 at com.android.volley.toolbox.HurlStack.addBodyIfExists(HurlStack.java:253)
                                                 at com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest(HurlStack.java:227)
                                                 at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:107)
                                                 at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:97)
                                                 at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
  12-22 00:24:55.742 22632-22664/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0921aa0</p>