[android-developers] Re: Http Post failing on only one phone

2013-03-19 Thread Lew
ga...@deanblakely.com wrote: The code pasted below has been successfully tested on several phones running Gingerbread, ICS, and Jelly Bean. However when testing on a friends Samsung 4GLTE model SCH-1200 (verison) the code fails. The post throws an exception and in the Catch, the log

[android-developers] Re: http post NetworkOnMainThreadException

2012-10-26 Thread djhacktor
After gingerbread android sdk doest allow having networking work on main thread UI one On Thursday, 25 October 2012 16:40:23 UTC+5:30, aueddonline wrote: Below I have some of my MainActivity class which starts by making a http post request to the web server running on my development laptop.

[android-developers] Re: HTTP Post works only on port 80 when on mobile network (Galaxy Nexus)

2012-07-30 Thread Zoran Smilevski
I have done even more research. Solution is to use Proxy.NO_PROXY: HttpURLConnection conn = (HttpURLConnection)mUrl.openConnection(Proxy. NO_PROXY); On Monday, July 23, 2012 10:02:02 AM UTC+2, Zoran Smilevski wrote: Oh yes, thanks. I don't see on Desire APN settings, but when I removed a

[android-developers] Re: HTTP Post works only on port 80 when on mobile network (Galaxy Nexus)

2012-07-23 Thread Johan Appelgren
Works fine using 3g on my Galaxy Nexus (stock, Android 4.1.1). Are you testing using the same carrier and APN settings on the Desire and Galaxy Nexus? I've had some issues with a bad carrier proxy that garbled non-port 80 traffic, fixed by removing the proxy from APN. On Sunday, July 15,

[android-developers] Re: HTTP Post works only on port 80 when on mobile network (Galaxy Nexus)

2012-07-23 Thread Zoran Smilevski
Oh yes, thanks. I don't see on Desire APN settings, but when I removed a proxy from APN on Nexus, response got through. Thanks again, you saved me :) On Monday, July 23, 2012 9:45:53 AM UTC+2, Johan Appelgren wrote: Works fine using 3g on my Galaxy Nexus (stock, Android 4.1.1). Are you

[android-developers] Re: HTTP Post works only on port 80 when on mobile network (Galaxy Nexus)

2012-07-22 Thread Zoran Smilevski
Can someone please confirm me, that is a problem posting data on a server on non-80 port, using mobile data, on Galaxy Nexus or probably some other ICS device? If it works for you, how do you do it? Thanks. On Sunday, July 15, 2012 12:10:02 PM UTC+2, Zoran Smilevski wrote: Hello! I have a

[android-developers] Re: HTTP POST to Web Server running on Android Device

2012-03-04 Thread Remote Red
line=POST / HTTP/1.1 line=Content-Length: 23 No you would see: line=POST / HTTP/1.1 line=Content-Length: 23 line=0 if a null was returned. But a null is never returned. Still your loop ends as instead an exception is trown. You did not see that because the catch does nothing. Add a Log.i

[android-developers] Re: HTTP POST to Web Server running on Android Device

2012-03-04 Thread Remote Red
line=POST / HTTP/1.1 line=Content-Length: 23 No, you would see: line=POST / HTTP/1.1 line=Content-Length: 23 line=0 if a null was returned. But a null is never returned. Still your loop ends as instead an exception is trown which you did not see because the catch statement is empty. Add a

[android-developers] Re: HTTP POST to Web Server running on Android Device

2012-03-04 Thread Remote Red
line=POST / HTTP/1.1 line=Content-Length: 23 No, you would see: line=POST / HTTP/1.1 line=Content-Length: 23 line=0 if a null was returned. But a null is never returned. Still your loop ends as instead an exception is trown which you did not see because the catch statement is empty. Add a

[android-developers] Re: HTTP POST to Web Server running on Android Device

2012-02-28 Thread Anil Jagtap
Kiran, I think you are looking for this: http://bytes.com/topic/java/answers/720825-how-build-http-post-request-java Cheers On Feb 27, 10:57 pm, Kiran kiran.ka...@gmail.com wrote: Hi All, I am trying to send a HTTP POST command from Android Device A to Android Device B.  Device B is running

[android-developers] Re: HTTP Post Json to IIS Service

2012-02-20 Thread T
So it looks like your trying to connect to a server What remote web services are you using. For a scanner project I created last semester, I used XAMPP locally(just to see code work correctly), then I used Teamviewer when I went live. On the remote server file, I placed a php file with the

Re: [android-developers] Re: Http post and get

2012-01-26 Thread Nedim Muminovic
Solved. Thanks On 21 January 2012 05:50, Guus Bloemsma g...@bloemsma.net wrote: You have to reuse the same cookie store, or better yet, the same http client. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send

[android-developers] Re: Http post and get

2012-01-23 Thread Guus Bloemsma
You have to reuse the same cookie store, or better yet, the same http client. -- 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@googlegroups.com To unsubscribe from this group, send

[android-developers] Re: HTTP post request with HTTP Auth

2011-11-28 Thread Fabio Sgrò
This is the way that i used for autnenticating a user in a Domino Server, hope will help... String namesUrl = http://...; HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(namesUrl); ListNameValuePair nameValuePairs = new ArrayListNameValuePair(2);

Re: [android-developers] Re: HTTP Post of Image

2011-07-28 Thread Sivasankar K
In your manifest file add permissions to camera and for uploading internet permission as follows uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.CAMERA / On Thu, Jul 28, 2011 at 11:07 AM, perumal316 perumal...@gmail.com wrote: Hi Siva,

[android-developers] Re: HTTP Post of Image

2011-07-27 Thread perumal316
Hi Siva, But my application keeps on crashing when I insert this line: URI mCapturedImageURI = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Must I add any permission in the manifest file? Basically I just want to get the string containing the path to the

[android-developers] Re: HTTP Post works in activity but not in service

2010-11-10 Thread Bob Kerns
Indeed, the onCreate method of any component, including the Application, is the wrong place to do any network operation or other thing that can cause delay. In fact, you don't want to be doing it in any method that runs on the main thread, including onStartCommand. I'd suggest using an AsyncTask.

[android-developers] Re: HTTP Post works in activity but not in service

2010-11-08 Thread loweroctave
Try putting it in onStartCommand() instead. I haven't had any problems doing posts from the service, but they all happen after the onCreate method. On Nov 5, 8:38 pm, Burk Ferden schneck.jus...@gmail.com wrote: Hello, I am trying to do a http post to a php script. the method works if I place

Re: [android-developers] Re: HTTP Post works in activity but not in service

2010-11-08 Thread tarek attia
On Mon, Nov 8, 2010 at 8:56 PM, loweroctave twinte...@gmail.com wrote: Try putting it in onStartCommand() instead. I haven't had any problems doing posts from the service, but they all happen after the onCreate method. On Nov 5, 8:38 pm, Burk Ferden schneck.jus...@gmail.com wrote: Hello,

[android-developers] Re: http POST request problem

2010-10-11 Thread karteek
Inorder to pass data using http post we need to set content-Type field in http header. Otherwise the server won't recognize your data which have been sent by parms. Try with the following Example httppost.setHeader(Content-Type,your content type supported by u r server); On Oct 11, 4:11 

[android-developers] Re: http POST request problem

2010-10-10 Thread dashman
ListNameValuePair params = new ArrayListNameValuePair(); params.add(new BasicNameValuePair(A, B)); even an empty params works fine. but as soon as i add en entry - it fails to response code 400. the weird thing is i copied this code verbatim from the c2dm android sample app -

[android-developers] Re: HTTP POST

2010-09-21 Thread Hotouch
if you are testing this on your emulator then you have to change localserver to your ip because emulator is it self a localserver. open your cmd and write ipconfig/all tp get your system ip and then place your ip instead of localhost and it should work this time :) Thanks On Sep 21, 10:11 pm,

[android-developers] Re: HTTP POST

2010-09-21 Thread John Gaby
Thanks for the reply. I have tried using the IP address of the host machine like this: String urlServer = http://192.168.1.101:3571/mycmd.aspx? command=test; but when I do that, my program times out on the 'connection.getOutputStream' call. I am also not sure I see how this would work anyway,

[android-developers] Re: HTTP POST

2010-09-21 Thread Kumar Bibek
Check if your server is responding or not. You should probably look at the Network Space Address on this page. http://developer.android.com/guide/developing/tools/emulator.html -Kumar Bibek http://techdroid.kbeanie.com On Sep 22, 12:18 am, John Gaby jg...@gabysoft.com wrote: Thanks for the

[android-developers] Re: HTTP POST

2010-09-21 Thread Chris Stratton
The following address from the emulator docs might be what you want: 10.0.2.2 Special alias to your host loopback interface (i.e., 127.0.0.1 on your development machine) Test it in the emulator's android browser before worrying about your code On Sep 21, 3:18 pm, John Gaby

[android-developers] Re: HTTP POST

2010-09-21 Thread Kumar Bibek
You said, that you cannot open the local server from the browser Surely, a problem with the server I suspect. -Kumar Bibek http://techdroid.kbeanie.com On Sep 22, 12:18 am, John Gaby jg...@gabysoft.com wrote: Thanks for the reply.  I have tried using the IP address of the host machine like

[android-developers] Re: HTTP POST

2010-09-21 Thread John Gaby
I checked out the link you provided and found that I needed to use the IP address 10.0.2.2 to access the host's loopback interface. I changed my request to us that IP and it works like a champ. Thanks much! On Sep 21, 12:28 pm, Kumar Bibek coomar@gmail.com wrote: Check if your server is

[android-developers] Re: HTTP post to non-standard port over Wifi?

2010-05-04 Thread Per
(blushing) arrgh - should have thought of that. You're right. Wifi access to that ip:port does not work from a PC, either. Sorry for taking up anyone's bandwidth :) /Per On 4 Maj, 07:49, Vinay S s.vinay@gmail.com wrote: Hi, Did you look at the router does it allow outgoing TCP traffic

[android-developers] Re: HTTP post to non-standard port over Wifi?

2010-05-03 Thread Vinay S
Hi, Did you look at the router does it allow outgoing TCP traffic to flow through for port 8080? -Vinay On May 3, 3:48 pm, Per p...@care2wear.com wrote: Hi, I have trouble getting http post to work over WiFi. The server listens at port 8080, and posting works just fine when disabling WiFi

[android-developers] Re: http POST message

2010-03-29 Thread Kumar Bibek
Use StringEntity class to generate a body which you can attach to the post method. http://icloud.com/wiki/index.php/A_Android_tutorial_to_get_you_started This example will get you started. Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Mar 29, 3:19 pm, MobDev

[android-developers] Re: HTTP Post

2009-04-19 Thread Aakash Patel
Here is some code that I am using in my app that is using HttpAuth and was a JSON client, I'm sure you can easily configure it to your needs. If you need anymore help just ask :-) public static final String HORDE_URI = http://10.0.0.60:80;; //-- base url public static final String RPC_PATH =

[android-developers] Re: HTTP Post

2009-04-19 Thread Aakash Patel
Here is some code that I am using in my app that is using HttpAuth and was a JSON client, I'm sure you can easily configure it to your needs. If you need anymore help just ask :-) public static final String HORDE_URI = http://10.0.0.60:80;; public static final String RPC_PATH = /mail/rpc.php;

[android-developers] Re: HTTP Post

2009-04-19 Thread Aakash Patel
Here is some code that I am using in my app that is using HttpAuth and was a JSON client, It should be very easy to configure it to your needs. public static final String HORDE_URI = http://10.0.0.60:80;; public static final String RPC_PATH = /mail/rpc.php; public static final String

[android-developers] Re: HTTP Post

2009-04-19 Thread Aakash Patel
Here is some code that I am using in my app that is using HttpAuth and was a JSON RPC client, It should be very easy to configure it to your needs. public static final String HORDE_URI = http://10.0.0.60:80;; public static final String RPC_PATH = /mail/rpc.php; public static final String

[android-developers] Re: HTTP Post with header

2008-12-18 Thread HCH
generally: http post requires content-length unless you use chunked encoding. In the example you give set the content-length to the length of your StringEntity. On Dec 17, 4:00 am, agal allgreekandla...@gmail.com wrote: Hi, I want to do an HTTP Post in Android, using the HttpClient 4.0