title: Android read from MYSQL on real device
body: <p>here is part of my code:</p>
  
  <pre><code>try {
      // make json string, try also hamburger
      //String json = "{\"pid\":\"name\",\"price\":\"created_at\",\"updated_at\":3}";
  
      // send as http get request
      URL url = new URL("http://smsas.eu/dm/get_all_products.php");
      URLConnection conn = url.openConnection();
  
      // Get the response
      BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
      String line;
      while ((line = rd.readLine()) != null) {
  
          //System.out.println(line);
  
          JSONObject nodeRoot  = new JSONObject(line); 
          JSONArray nodeStats = nodeRoot.getJSONArray("products");
          for(int i=0; i &lt; nodeStats.length();i++){
          String sSDR = nodeStats.getJSONObject(i).getString("name");
          System.out.println(sSDR);
          tt.setText(sSDR);
           }
  
  
  
      }
      rd.close();
  } catch (Exception e) {
      tt.setText("ERR");
  
      e.printStackTrace();
  
  }
  </code></pre>
  
  <p>When I run app on virtual device it's working, but when I run on my phone - not. I've already added internet permission.</p>