My Android application uses URLConnection
to connect to a webservice. It's in the market over a year now and works quite well. However, problems with Galaxy Nexus users came up recently:
When getting the input stream (not even reading yet!) from the URLConnection
like:
final BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()), 8192);
A EOFException
is thrown at getInputStream()
.
First I thought this may be an ICS problem, so I installed an early build on my Nexus S, but there I couldn't reproduce the problem. Then I got access to a Galaxy Nexus, which crashes in the same way as the bug reports I've received, which makes me believe that it's probably not a case of a single phone acting weird.
The stack trace of the crash can be seen here and the whole code on GitHub. It's really weird, the app has some 100k+ installations on Android Market and the problem only seem to occur on the Galaxy Nexus.
Any hints or suggestions would be greatly appreciated!