title: Not getting data from JSON Call Android
body: <p>This is my java file where I'm trying to call Json, but I'm not getting any data. Also I'm not getting any error, so I couldn't find where the problem is.</p>
  
  <p>Here is my code and the Json looks like this:</p>
  
  <pre><code>[
    {
      "title": "Quest",
      "description": "Description Quest",
      "district": "District Quest"; 
    }
  ]
  </code></pre>
  
  <p><strong>AND THE CODE:</strong></p>
  
  <pre><code>    public class Quests extends Fragment {
  
      // Log tag
      private static final String TAG = Quests.class.getSimpleName();
  
      // Quest Json url
      private static final String url = "http://my-ip-adress-of-computer/project/quests.txt";
      private ProgressDialog pDialog;
      private List&lt;com.dusandimitrijevic.model.Quests&gt; questList = new ArrayList&lt;com.dusandimitrijevic.model.Quests&gt;();
      private ListView listView;
      private QuestListAdapter adapter;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.quests, container, false);
  
          pDialog = new ProgressDialog(getActivity());
          // Showing progress dialog before making http request
          pDialog.setMessage("Loading...");
          pDialog.setCancelable(false);
          pDialog.show();
  
          listView = (ListView) rootView.findViewById(R.id.list);
          adapter = new QuestListAdapter(getActivity(), questList);
          listView.setAdapter(adapter);
  
          fetchQuests();
  
  
          return rootView;
      }
  
      private void fetchQuests() {
          // Creating volley request obj
          JsonArrayRequest questReq = new JsonArrayRequest(url,
                  new Response.Listener&lt;JSONArray&gt;() {
                      @Override
                      public void onResponse(JSONArray response) {
                          Log.d(TAG, response.toString());
                          hidePDialog();
                          // Parsing json
                          for (int i = 0; i &lt; response.length(); i++) {
                              try {
  
                                  JSONObject obj = response.getJSONObject(i);
                                  com.dusandimitrijevic.model.Quests q = new com.dusandimitrijevic.model.Quests();
                                  q.setTitle(obj.getString("title"));
                                  q.setDescription(obj.getString("description"));
                                  q.setDistrict(obj.getString("district"));
  
                                  // adding quests to quest array
                                  questList.add(q);
  
                              } catch (JSONException e) {
                                  e.printStackTrace();
                              }
  
                          }
                          adapter.notifyDataSetChanged();
                          // stopping swipe refresh
                          //swipeRefreshLayout.setRefreshing(false);
                      }
  
  
                  }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  VolleyLog.d(TAG, "Error: " + error.getMessage());
                  hidePDialog();
  
                  // stopping swipe refresh
                  //swipeRefreshLayout.setRefreshing(false);
              }
          });
  
          // Adding request to request queue
          AppController.getInstance().addToRequestQueue(questReq);
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
          hidePDialog();
      }
  
      private void hidePDialog() {
          if (pDialog != null) {
              pDialog.dismiss();
              pDialog = null;
          }
      }
  }
  </code></pre>