[android-developers] Re: HttpURLConnection with POST method

2011-11-02 Thread jesb
did you ever try it on a tablet? i found out that httpurlconnection tutorial i wrote doesn't work with android 3.x tablet. i can't seem to get anything stream back from the server. it always returns empty. On Sep 16, 11:56 pm, Alan alans_1...@yahoo.com wrote: Found the problem on 2.3 in the

[android-developers] Re: HttpURLConnection with POST method

2011-09-16 Thread Alan
I may post this to a new subject, but I'll try here. Two days after giving this code sample, I found it doesn't work on Android ver. 2.3! My phone (LG Ally) and emulator were running version 2.2.2 the code below was working fine. I had a co-worker run the program on his phone it didn't work. His

[android-developers] Re: HttpURLConnection with POST method

2011-09-16 Thread Alan
Found the problem on 2.3 in the emulator at least. It works if I add urlConnection.setRequestProperty(Content-Type, application/x-www- form-urlencoded); after the urlConnection.setRequestMethod(POST); line in the example in my earlier posting. The link I worked from (also given above)

[android-developers] Re: HttpURLConnection with POST method

2011-09-14 Thread Alan
Thank you so much for sharing that link... it helped me a great deal. I wound up combining parts of that code with others to come up with this: /* Note: these are some methods in a class I wrote. mURLString is the url to * talk to such as http://somesite/somefile.php;; parameters are the

[android-developers] Re: HttpURLConnection with POST method

2011-08-30 Thread jesb
i figured it out. http://digitallibraryworld.com/?p=189 On Aug 16, 3:21 pm, lbendlin l...@bendlin.us wrote: POST works very different from GET. You need to spend much more energy to format the request body. You're missing the whole Content-Disposition: form-data  and the delimiter definitions

[android-developers] Re: HttpURLConnection with POST method

2011-08-16 Thread Albert
Are you testing this on a 2.3.3 device? On Aug 16, 4:37 am, Budi Wibowo budiat...@gmail.com wrote: I'm very new to android programming. I'm more used to c# programming. I'm having problem sending POST data to a PHP page using HttpURLConnection. i know that POST data has to be encoded in

[android-developers] Re: HttpURLConnection with POST method

2011-08-16 Thread lbendlin
POST works very different from GET. You need to spend much more energy to format the request body. You're missing the whole Content-Disposition: form-data and the delimiter definitions etc. your out.write should then use the prepared request body string (as you did, sort of). -- You