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 throws a null
Pointer exception.
I
http://developer.android.com/training/basics/network-ops/connecting.html#AsyncTask
Am 26.10.12 11:38, schrieb Amey Bapat:
On Thu, Oct 25, 2012 at 4:40 PM, aueddonline
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group
http://lmgtfy.com/?q=NetworkOnMainThreadException+in+android
On Thu, Oct 25, 2012 at 4:40 PM, 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. The
> webpage outputs some JSON also s
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. The
webpage outputs some JSON also shown below; However I am getting
a NetworkOnMainThreadException when running the app. I can go into the
browser within th
hello, i have a task to create a client for android that can add remotely
entries to www blog. I came across problem in using HTTP post request.
whenever i call it i get in response the HTML code of the site i am
requesting. ( Site contains form with textfields i will describe bellow)
html of s
Hello!
I have a problem with posting data when using mobile data network on a port
different than 80. This happens only on Galaxy Nexus. I have also reported
a bug with detailed description
(http://code.google.com/p/android/issues/detail?id=34769). There is also a
demo app so anyone can test t
Most likely you are not setting the boundary correctly. As others were
saying, examine the output and compare with other outputs that are known to
work.
On Thursday, April 12, 2012 4:50:38 AM UTC-4, Farhan wrote:
> If anyone here is interested in answering, they may answer at :
>
> http://stack
If anyone here is interested in answering, they may answer at :
http://stackoverflow.com/questions/10120280/http-post-not-going-through-i-dont-think-i-am-missing-a-parameter
On Thu, Apr 12, 2012 at 8:49 AM, Farhan Tariq wrote:
> I did, I guess it is the problem with the request I am making and
I did, I guess it is the problem with the request I am making and not with
android httpclient.
On Thu, Apr 12, 2012 at 8:41 AM, Kumar Bibek wrote:
> Try sending this request through your browser, and see what happens. Or
> get some server logs.
>
> *Thanks and Regards,
> Kumar Bibek*
> *
> http:
Try sending this request through your browser, and see what happens. Or get
some server logs.
*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*
On Thu, Apr 12, 2012 at 9:09 AM, Farhan Tariq wrote:
>
>
> httpPost.setHeader("Content-Type", "application/x-w
httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
Did not have any effect...
On Thu, Apr 12, 2012 at 8:28 AM, Farhan Tariq wrote:
> I thought it had something to do with android's http classes. If I am
> wrong, I am sorry about that, but any help is welcome though.
>
>
>
I thought it had something to do with android's http classes. If I am
wrong, I am sorry about that, but any help is welcome though.
On Thu, Apr 12, 2012 at 8:19 AM, Nikolay Elenkov
wrote:
> On Thu, Apr 12, 2012 at 12:14 PM, Farhan Tariq
> wrote:
> > I get response code 200, response OK. But the
On Thu, Apr 12, 2012 at 12:14 PM, Farhan Tariq wrote:
> I get response code 200, response OK. But the html that gets generated has
> the form itself. I think I am making the correct post request, but can't
> figure out why it is not going through. Could it possibly have to do with
> the form page
Try setting the header Content-Type to
httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
http://stackoverflow.com/questions/4582471/problem-simulating-http-post-using-httpclient
*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*
On
Ideally, I should get response code 302 for the post, but I keep getting
200 (the html of the form itself)
On Thu, Apr 12, 2012 at 8:14 AM, Farhan Tariq wrote:
> I get response code 200, response OK. But the html that gets generated has
> the form itself. I think I am making the correct post req
I get response code 200, response OK. But the html that gets generated has
the form itself. I think I am making the correct post request, but can't
figure out why it is not going through. Could it possibly have to do with
the form page being in ASP ?
On Thu, Apr 12, 2012 at 8:03 AM, Kumar Bibek w
What response do you get? Response Code? Also look at the server logs to
get a clear picture of what's going on.
*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*
On Thu, Apr 12, 2012 at 8:30 AM, Farhan Tariq wrote:
> Hi, I want to submit a form from wit
Hi, I want to submit a form from within my app. The form can be found here
>> http://customer.chuckwilson.com/Default.aspx
I have added all the parameters, but the request is not going through. I
keep getting the form as the response. What am I doing wrong here? My code
is below:
try {
Hi All,
I am trying to send a HTTP POST command from Android Device A to
Android Device B. Device B is running a simple web server. The code
that I am using for the webserver is here:
http://code.google.com/p/android-webserver/
I am adding functionality to the code for it to process HTTP POST
Hi All,
I have an IIS service (.net) that I'm obviously not passing the
correct json message to. I have tried many of the examples I have
found on the web, but they all seem to point to PHP services. I'm
doing everything as everyone else is...and the json string looks as it
should. Can someone
My application connects to website which requires username and password.
After POST is done http GET cannot access next page after login.
After searching for solution I cam e to conclusion I need to send cookie
with http POST.
Tried this
DefaultHttpClient mHttpClient = new DefaultHttpClient();
As the topic indicates I'm trying to perform a http post request to a page
secured with basic http authentication.
It works from the command line with curl as following:
curl http://snot%40snot.dk:supersnot_at_teletracker.herokuapp.com/devices
-d "device[name]=snot" -d "device[device_id]=1234"
using the uri of content resolver you can get the path where it is getting
stored
URI mCapturedImageURI =
getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
values);
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.
Hi All,
I am using the following intent to invoke the camera:
Intent cameraIntent = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivity(cameraIntent);
The image is saved into the sdcard with the time/date as the name. I
want to do a HTTPPost of this image once the picture
Hi All,
I need to send/receive file from android device to app server.
I need to write communication channel for both ends. Web-services is
one way of communicating using ksoap2, but simpler way is to use HTTP post
to send file from android device.
What are the problems I may face if I u
There is no reason why it should not work for a service. Do you see anything
in the Logcat? Are you sure it's a timeout? Can you post the stack trace?
On Sat, Nov 6, 2010 at 7:08 AM, Burk Ferden wrote:
> Hello,
> I am trying to do a http post to a php script. the method works if I
> place it in
Hello,
I am trying to do a http post to a php script. the method works if I
place it in the onCreate event of the application but gets a
ConnectionTimeOut error when it tries to execute it from the service.
Here is an example of my method
String url = "http://myurl/"; +
"?tmpl=java
Need to see how you are setting the params to have any idea of how to
help.
My guess is that you are sending an invalid parameter and the server is
refusing the connection because of that.
Sincerely,
Brad Gies
---
Bistro Bo
in the following code - i get an http response code
400 - BAD REQUEST.
if i comment out the post.setEntity() line - then it
works fine - response code 200.
of course i've got internet permission
params is a list of 1 entry - string2string mapping.
URI uri = new URI(urlPath);
H
Take a look at the HttpGet and HttpPost method in the API.
On Mon, Sep 27, 2010 at 10:48 AM, dadada wrote:
> hello,
>
> i want to post data onto google map. since there's no gdata for
> android, i reckon that i have to do it through http post and get which
> i am not good at.
>
> is there some re
hello,
i want to post data onto google map. since there's no gdata for
android, i reckon that i have to do it through http post and get which
i am not good at.
is there some reference code for doing http post and get request?
Both the url to the map and xml are the same
http://maps.google.com/ma
I am trying to do an HTTP POST of some data. The following is a test
routine that I wrote to try and accomplish this:
void Put()
{
HttpURLConnection connection = null;
DataOutputStream outputStream = null;
String urlServer =
"http:
Hallo!
I'm trying to send some json object as postparameters using the
httpclient. Therefore on the (android) client I use the following
code:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httpPostRequest = new
HttpPost("http://10.0.2.2/TestServlet?
testPa
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 and just using 3G.
When enabling WiFi, I always get an IOException with message 'Socket
is not connected'.
Using the standard port 80 (or opening raw sockets t
Hi.
I ahve been trying to send a http POST message towards my server, I
have been using this code :
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(sUrl);
// Add your data
List nameValuePairs = new
ArrayList(1);
String userAgent = Management.getInstance().getUser
Yo.
Im finding this topic severely lacking in attempts.
I have an http post. I want to post it THROUGH an intent to a browser
and browse. howto
Use the part of an intent??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
I'm trying to do an HTTP Post, but I'm having a lot of trouble. I have
a server running on my computer. I know the URL needs to be my IP
address and port number. How do you create a URL object out of an IP
address and port number? I also have some headers and such that I need
to put on the post me
Hi,
I want to do an HTTP Post in Android, using the HttpClient 4.0 APIs.
This is my code snippet:
...
HttpClient postclient = new DefaultHttpClient();
HttpPost postMethod=new HttpPost(posturl);
postMethod.addHeader("Content-Type", "the type");
String requestBody = "some text";
postMethod.setEntit
Hi,
anyone has an HTTP POST-Reply sample working on SDK 0.9 available
please?
Any help is greatly appreciated.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group,
39 matches
Mail list logo