Issues with opening a socket on ICS
<p>So I'm having a problem making a new socket. I had this program that worked perfectly on gingerbread, but since my HTC sensation xe updated to ICS the program crashes each time I try to open a socket. I had a program sending gyro data to a server on my local network. Since this problem came up I've reduced my code down to the smallest component that still causes the problem, so here it is.</p>

<pre><code>package com.mytesting;

import java.net.Socket;
import android.app.Activity;
import android.os.Bundle;
import java.io.*;
import java.net.*;

public class SocketTestingActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);      
        try {
            Socket clientSocket = new Socket("192.168.1.7", 23000);
        } catch (UnknownHostException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }


    }
}
</code></pre>

<p>I've included:</p>

<pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;   
</code></pre>

<p>in the manifest file too.</p>

<p>All of this stuff was working just perfectly before ICS. Now when I run the program, I just get the message "Unfortunately, SocketTesting has stopped."</p>

<p>Does anyone know what I am doing wrong, I am quite new to android programming, and java programming in general.</p>

<p>Thanks for any help, guys.</p>
