title: Not taking value from json array in android?
body: <p>I am taking value from Json Array and passing it to GridView but its not taking value from json into gridview..i know something is missing in code...as a newbie i dont know know what is missing??</p>
  
  <p>here is a code:</p>
  
  <pre><code> private void getData() {
          //Showing a progress dialog while our app fetches the data from url
          final ProgressDialog loading = ProgressDialog.show(this, "Please wait...", "Fetching data...", false, false);
          String DATA_URL = "http://........nList";
  
          StringRequest stringRequest = new StringRequest(Request.Method.POST, DATA_URL,
                  new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          //Toast.makeText(PMPigeonListingActivity.this,response,Toast.LENGTH_LONG).show();
                          loading.dismiss();
                          try {
                              JSONArray json = new JSONArray(response);
                              for (int i = 0; i &lt; json.length(); i++) {
                                  //Creating a json object of the current index
                                  JSONObject obj = null;
                                  try {
                                      //getting json object from current index
                                      obj = json.getJSONObject(i);
                                      //getting image url and title from json object
                                      pid.add(obj.getInt(String.valueOf(TAG_PID)));
                                      pname.add(obj.getString(TAG_PNAME));
                                      pdetails.add(obj.getString(TAG_PDETAILS));
                                      pmobile.add(obj.getString(TAG_MOBILE));
                                      pemail.add(obj.getString(TAG_EMAIL));
                                      images.add(obj.getString(TAG_IMAGE_URL));
                                      names.add(obj.getString(TAG_NAME));
                                  } catch (JSONException e) {
                                      e.printStackTrace();
                                  }
                              }
                          } catch (JSONException e) {
                              e.printStackTrace();
                          }
  
                          //Creating GridViewAdapter Object
                          PMPigeonListAdapter pmpigeonlistadapter = new PMPigeonListAdapter(getApplicationContext(), images, names, pid, pdetails, pmobile, pemail, pname);
  
                          //Adding adapter to gridview
                          pmpigeonlistadapter.notifyDataSetChanged();
                          gridView.setAdapter(pmpigeonlistadapter);
  
                      }
                  },
                  new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          //Toast.makeText(PMPigeonListingActivity.this, error.toString(), 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("country", PostCountry);
                  params.put("strain", PostStrain);
                  params.put("distance", PostDistance);
                  return params;
              }
  
          };
  
          RequestQueue requestQueue = Volley.newRequestQueue(this);
          requestQueue.add(stringRequest);
  
  
      }
  </code></pre>
  
  <p>my xml:</p>
  
  <pre><code> &lt;GridView
                  android:id="@+id/gridView"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:columnWidth="90dp"
                  android:divider="@color/list_divider"
                  android:gravity="center"
                  android:horizontalSpacing="1dp"
                  android:numColumns="3"
                  android:stretchMode="columnWidth"
                  android:verticalSpacing="1dp"&gt;&lt;/GridView&gt;
          &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>json output::</p>
  
  <pre><code>{
    "status_code": 200,
    "status": "OK",
    "status_message": "Success",
    "pigeon_list": [
      {
        "id": "1",
        "pigeon_name": "sofiee",
        "auth_token": "58809c7129a5a",
        "country_code": "AE",
        "strain_id": "75",
        "distance": "3",
        "pigeon_price": "50.00",
        "pigeon_details": "One of the best ",
        "image": "http:.98a8ac5.jpeg",
        "pedigree_image": "http://...1.jpeg",...
        "status": "",
        "created": "2017-01-19 16:52:14",
        "updated": "0000-00-00 00:00:00",
        "strain_name": "Janssen/gaston wowers ",
        "usr_mobile": "+971/505040009",
        "usr_image": "http://....19a.jpeg",
        "usr_email": "...edo@gmail.com"
      },
  </code></pre>