title: socket failed: EACCES (Permission denied)
body: <p>Although I added the following to my Manifest file:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  </code></pre>
  
  <p>I still get the following error:</p>
  
  <pre><code>07-09 13:26:18.650: E/Trace(10542): error opening trace file: No such file or directory (2)
  07-09 13:26:19.830: D/dalvikvm(10542): GC_CONCURRENT freed 44K, 7% free 2774K/2960K, paused 17ms+5ms, total 111ms
  07-09 13:26:19.910: W/System.err(10542): org.apache.http.conn.HttpHostConnectException: Connection to https://78.46.124.109 refused
  07-09 13:26:19.919: W/System.err(10542):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
  07-09 13:26:19.919: W/System.err(10542):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
  07-09 13:26:19.919: W/System.err(10542):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
  07-09 13:26:19.930: W/System.err(10542):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
  07-09 13:26:19.930: W/System.err(10542):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
  07-09 13:26:19.940: W/System.err(10542):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
  07-09 13:26:19.940: W/System.err(10542):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
  ...
  07-09 13:26:19.989: W/System.err(10542): Caused by: java.net.ConnectException: socket failed: EACCES (Permission denied)
  07-09 13:26:20.020: W/System.err(10542):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:181)
  07-09 13:26:20.020: W/System.err(10542):    ... 22 more
  07-09 13:26:20.020: W/System.err(10542): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
  07-09 13:26:20.040: W/System.err(10542):    at libcore.io.IoBridge.socket(IoBridge.java:583)
  07-09 13:26:20.040: W/System.err(10542):    at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
  </code></pre>
  
  <p>This is my code in an external file called Logic.java which gets called from the MainActivity.java class:</p>
  
  <pre><code>public class Logic {
  
      public void getJSONFromUrl( String url )
      {
           URL myurl = null;
           String jsoncode = "";
  
           try {
             myurl = new URL(url);
           } catch (MalformedURLException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
           try {
               URLConnection myconn =myurl.openConnection();
               InputStream in= new BufferedInputStream(myconn.getInputStream());
               InputStreamReader reader = new InputStreamReader(in);
               BufferedReader br = new BufferedReader(reader);
               String line;
               StringBuilder sb = new StringBuilder();
               while((line=br.readLine())!=null)
               {
                   sb.append(line);
                   //Toast.makeText(getApplicationContext(), "i enter here",Toast.LENGTH_LONG).show();
               }
               jsoncode = sb.toString();
  
           } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
  
  
           System.out.println("json from server:\n" + jsoncode );
          }
  } 
  </code></pre>
  
  <p>What else could I be doing wrong here?</p>