[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2013-04-08 Thread rackham
Note that this can open the door to this bug https://code.google.com/p/android/issues/detail?id=29509 which can cause https sockets to close when using network data. Quite a big one for my project so may have to try bypassing the proxy or reverting to HttpClient... On Tuesday, 27 November 2012

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-28 Thread Fritjof
This appears to have solved the problem for me: if (Build.VERSION.SDK != null Integer.parseInt(Build.VERSION.SDK) 13) { urlConnection.setRequestProperty(Connection, close); //disables connection reuse } On Friday, November 23, 2012 11:34:12 AM UTC+1, b0b wrote: On Friday,

Re: [android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-28 Thread Ralph Bergmann | the4thFloor.eu
Am 27.11.12 11:40, schrieb Fritjof: Integer.parseInt(Build.VERSION.SDK) 13) why you parse a int to Integer and let it automatically convert (unboxing) to int? http://javarevisited.blogspot.de/2012/07/auto-boxing-and-unboxing-in-java-be.html Ralph -- You received this message because you

Re: [android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-28 Thread Piren
That's cause he's using the wrong field... that field is in fact a String, but was deprecated a long long while ago. He should be using SDK_INT On Wednesday, November 28, 2012 9:25:04 AM UTC-5, Ralph Bergmann wrote: Am 27.11.12 11:40, schrieb Fritjof: Integer.parseInt(Build.VERSION.SDK)

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-28 Thread bob
You could always use a java.net.Socket. That's probably what I would do. On Thursday, November 22, 2012 3:58:52 AM UTC-6, Ryan Bateman wrote: I'm attempting to write a simple API management class and running into an issue when using HttpUrlConnection to POST content on a Galaxy Nexus

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-23 Thread Ryan Bateman
This also seems to happen on the Nexus 7 running 4.1 / 4.2 but again, not on the emulator versions. On Thursday, November 22, 2012 9:58:52 AM UTC, Ryan Bateman wrote: I'm attempting to write a simple API management class and running into an issue when using HttpUrlConnection to POST

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-23 Thread b0b
Don't quote me on that but I vaguely remember someone mentionning that POST request must not have a body. So I'd try again with no body. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-23 Thread Ryan Bateman
That's not right, I'm afraid (unless I'm misunderstanding you.) POST requests for REST APIs generally have a body that contains their content. I had a dig into the Google IO 2012 POST request code and it seems like it does some odd things. HttpURLConnection conn = null; try {

[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2

2012-11-23 Thread b0b
On Friday, 23 November 2012 11:23:45 UTC+1, Ryan Bateman wrote: That's not right You are right. What I said was for DELETE requests. Of course POST requests have a body. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to