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://lmgtfy.com/?q=NetworkOnMainThreadException+in+android
On Thu, Oct 25, 2012 at 4:40 PM, aueddonline commsult...@gmail.com 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
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 commsult...@gmail.com
laptop. The webpage outputs some JSON also shown below; However I am
getting a
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
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
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
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 farhan@gmail.com wrote:
I did, I guess it is the problem with the
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 :
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 farhan@gmail.com wrote:
httpPost.setHeader(Content-Type,
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 coomar@gmail.com wrote:
Try sending this request through your browser, and see what happens. Or
get some server logs.
*Thanks and Regards,
Kumar
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
But
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
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);
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
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/; +
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 schneck.jus...@gmail.comwrote:
Hello,
I am trying to do a http post to a php script. the method
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);
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
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
Take a look at the HttpGet and HttpPost method in the API.
On Mon, Sep 27, 2010 at 10:48 AM, dadada ytbr...@gmail.com 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
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 =
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?
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
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
ListNameValuePair nameValuePairs = new
ArrayListNameValuePair(1);
String userAgent =
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 data part of an intent??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
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
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.setEntity(new
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,
31 matches
Mail list logo