title: Android socket app crash
body: <p>I want my app to connect to a server. I only want the client.</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      //...
      try {
               InetAddress serverAddr = InetAddress.getByName(serverIpAddress);
               socket = new Socket(serverAddr, REDIRECTED_SERVERPORT);
  
      } catch (UnknownHostException e1) {
           //... 
      } catch (IOException e1) {
           //...
      }
  }
  </code></pre>
  
  <p>But the application just crashes. I started this activity by pressing a button.
  Do you know what the problem could be?</p>