Join now - be part of our community!

SocketTimeoutException occurs frequently in ICS.

granoeste
Visitor

SocketTimeoutException occurs frequently in ICS.

The application that I have created, an exception is raised frequently in the Xperia Active and Xperia SX.

09-07 13:11:56.755: W/System.err(2012): Caused by: java.net.SocketTimeoutException

09-07 13:11:56.765: W/System.err(2012):           at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491)

09-07 13:11:56.765: W/System.err(2012):           at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

09-07 13:11:56.765: W/System.err(2012):           at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

09-07 13:11:56.765: W/System.err(2012):           at java.io.InputStream.read(InputStream.java:163)

09-07 13:11:56.765: W/System.err(2012):           at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)

09-07 13:11:56.765: W/System.err(2012):           at java.io.BufferedInputStream.read(BufferedInputStream.java:227)

09-07 13:11:56.765: W/System.err(2012):           at libcore.io.Streams.readAsciiLine(Streams.java:201)

09-07 13:11:56.765: W/System.err(2012):           at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:544)

09-07 13:11:56.775: W/System.err(2012):           at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:791)

09-07 13:11:56.775: W/System.err(2012):           at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)

09-07 13:11:56.775: W/System.err(2012):           at libcore.net.http.HttpURLConnectionImpl.getResponseMessage(HttpURLConnectionImpl.java:475)

The application is very simple using the HttpURLConnection.

HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();

try {

    urlConnection.setDoOutput(true);

    urlConnection.setChunkedStreamingMode(0);

    urlConnection.setRequestMethod("POST");

    urlConnection.connect();

    String responseMessage = urlConnection.getResponseMessage();

    int responseCode = urlConnection.getResponseCode();

    final String contentType = connection.getContentType();

    InputStream in = new BufferedInputStream(urlConnection.getInputStream());

    readStream(in);

    in.close;

} catch (Exception e) {

    e.printStackTrace();

} finally {

    urlConnection.disconnect();

}

You can not be an exception occurs on the ICS devices from other vendors.

I do not think the problem of the application.

There is no workaround or something?

1 REPLY 1
granoeste
Visitor

Mmm...

Main: Video Example Shows ICS and WiFi Connectivity Issue http://talk.sonymobile.com/thread/37014?tstart=0

Main: Wi-Fi problems? Look here first. http://talk.sonymobile.com/thread/31449

This problem has occurred in WiFi connection.

These obstacles may be the causes of the problem.