I need to do a Http post of some strings to a web service. I am using KSoap.
@Override
protected JSONObject doInBackground(JSONObject... params) {
String
For Android 2.3 (Gingerbread) and higher, the HttpUrlConnection is recommended instead of the HttpClient. See this Android team post: http://android-developers.blogspot.com/2011/09/androids-http-clients.html
It's possible that HttpClient is buggy on the device you're using and there are issues sending data over 3G.
Also, be sure to call this method before doing an HTTP request when using the HttpURLConnection:
private void disableConnectionReuseIfNecessary() {
// HTTP connection reuse which was buggy pre-froyo
if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO) {
System.setProperty("http.keepAlive", "false");
}
}