title: Volley no response from HTTP GET
body: <p>I'm trying to retrieve the JSON from an API but I'm not getting anything. 
  The JSON : </p>
  
  <pre><code>{"coord":{"lon":90.41,"lat":23.71},"weather":[{"id":721,"main":"Haze","description":"haze","icon":"50n"}],"base":"stations","main":{"temp":25,"feels_like":28.6,"temp_min":25,"temp_max":25,"pressure":1011,"humidity":83},"visibility":3500,"wind":{"speed":1.5,"deg":90},"clouds":{"all":75},"dt":1588093825,"sys":{"type":1,"id":9145,"country":"BD","sunrise":1588029983,"sunset":1588076702},"timezone":21600,"id":1185241,"name":"Dhaka","cod":200}
  </code></pre>
  
  <p>I did add INTERNET permission : </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  </code></pre>
  
  <p>My code :</p>
  
  <pre><code>    private void httpGet() {
      // Instantiate the RequestQueue.
      RequestQueue queue = Volley.newRequestQueue(this);
      String url = "https://api.openweathermap.org/data/2.5/weather?q=" + CITY + "&amp;units=metric&amp;appid=" + API;
      //https://api.openweathermap.org/data/2.5/weather?q=dhaka,bd&amp;units=metric&amp;appid=5694263c8d821570bfccff2a13246a73
      Log.d("TEST", "Fonction lancee 1/2" + url);
  
      JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
              (Request.Method.GET, url, null, new Response.Listener&lt;JSONObject&gt;() {
                  @Override
                  public void onResponse(JSONObject response) {
                      Log.d("TEST", "Fonction lancee 3/2" + response);
                  }
              }, new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      Log.d("TEST", "Erreur");
                  }
              });
      queue.add(jsonObjectRequest);
  }
  </code></pre>
  
  <p>I also tested with StringRequest with the same result, no response.</p>
  
  <p>EDIT 
  My entire classe to see the context :</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  TextView tempTxt;
  String CITY = "dhaka,bd";
  String API = "5694263c8d821570bfccff2a13246a73";
  String url = "https://api.openweathermap.org/data/2.5/weather?q=" + CITY + "&amp;units=metric&amp;appid=" + API;
  //https://api.openweathermap.org/data/2.5/weather?q=dhaka,bd&amp;units=metric&amp;appid=5694263c8d821570bfccff2a13246a73
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      tempTxt = findViewById(R.id.tempTxt);
      httpGet();
      //new weatherTask().execute();
      Log.d("TEST", "TEST OUT CALL");
  
      Button button2 = findViewById(R.id.definirp);
  
      button2.setOnClickListener(new View.OnClickListener() {
          //Passer a la seconde Activity
          public void onClick(View v) {
              Intent activity2 = new Intent(getApplicationContext(), Activity2.class);
              startActivity(activity2);
              finish();
          }
      });
  
      //Affichage de l'heure
      Thread t = new Thread() {
          @Override
          public void run() {
              try {
                  while (!isInterrupted()) {
                      Thread.sleep(1000);
                      runOnUiThread(new Runnable() {
                          @Override
                          public void run() {
                              TextView theure = (TextView) findViewById(R.id.date);
                              TextView tdate = (TextView) findViewById(R.id.heure);
                              long date = System.currentTimeMillis();
  
                              //Format de l'heure
                              SimpleDateFormat sdfTime = new SimpleDateFormat("hh:mm:ss");
                              SimpleDateFormat sdfDate = new SimpleDateFormat("MMM dd yyyy");
  
                              String timeString = sdfDate.format(date);
                              String dateString = sdfTime.format(date);
  
                              theure.setText(timeString);
                              tdate.setText(dateString);
  
                          }
                      });
                  }
              } catch (InterruptedException e) {
              }
          }
      };
      t.start();
  }
  
  
  private void httpGet() {
      // Instantiate the RequestQueue.
      RequestQueue queue = Volley.newRequestQueue(this);
      String url = "https://api.openweathermap.org/data/2.5/weather?q=" + CITY + "&amp;units=metric&amp;appid=" + API;
      //https://api.openweathermap.org/data/2.5/weather?q=dhaka,bd&amp;units=metric&amp;appid=5694263c8d821570bfccff2a13246a73
  
      // Request a string response from the provided URL.
      StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      // Display the first 500 characters of the response string.
                      tempTxt.setText(response.toString());
                  }
              }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError error) {
              tempTxt.setText("That didn't work!");
          }
      });
      queue.add(stringRequest);
  }
  </code></pre>
  
  <p>You can test the page of my JSON, the address is in comment in my code, (there is a comma in the city), it works.</p>