Questions tagged [androidhttpclient]

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android This class was deprecated in API level 22 (Android 5.1). Please use URLConnection and friends instead. The Apache HTTP client is no longer maintained and may be removed in a future release. Please visit this webpage for further details.

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android.

Warning: This class was deprecated in API level 22 (Android 5.1).
Please use URLConnection and friends instead. The Apache HTTP client is no longer maintained and may be removed in a future release. Please visit this webpage for further details.

Useful links

418 questions
2
votes
2 answers

Send information from android application to a Web Service and back

Let's say I need to create an android app which will, on the click of a button, send a number from a textbox to a web service. This service will send back a string saying "your number was ... " and a list of employees taken from a database sent back…
2
votes
1 answer

How can I authenticate to my server with the Login credentials in android?

I'm very new to Android and since I'm a self learner I've been stuck with the following problem. I have a simple code in MainActivity as login.setOnClickListener(new View.OnClickListener() { @Override public void…
2
votes
5 answers

Proguard returned with error code 1. See console java.io.IOException

While exporting my Android Application from Eclipse IDE, I am getting errors as below: Proguard returned with error code 1. See console Warning: library class android.net.http.AndroidHttpClient extends or implements program class…
AndyN
  • 1,742
  • 1
  • 15
  • 30
2
votes
1 answer

How to set the maximum number of network connections in Retrofit

I was going through some AQuery code here and found there's a way to modify the number of network connections in AQuery. Is there a way of doing this in retrofit, and what are the default values for retrofit? /* Settings of Image */ //set the max…
dowjones123
  • 3,695
  • 5
  • 40
  • 83
2
votes
1 answer

How to wait for two Async HTTP request complete with loopj HTTP library

My case is that I need to get two sets of data from sever with two HTTP get request, then process them together. I'm using loopj's http library to do the task. The problem is that since loopj's http is Async, which means I can't determine when they…
Arthur Wang
  • 3,118
  • 4
  • 21
  • 29
2
votes
1 answer

org.apache.http.NoHttpResponseException: The target server failed to respond in android

Recently move all data to new server, after am got this exception org.apache.http.NoHttpResponseException: The target server failed to respond in all JSON links but its working perfectly in browsers.In old server its was worked well.am not able to…
Yugesh
  • 4,030
  • 9
  • 57
  • 97
2
votes
4 answers

Check working internet connection in Android

I am trying to check working internet connection (not wifi connected). I tried the below code to check if response is 200. final int CONNECTION_TIMEOUT = 2000; try { HttpURLConnection mURLConnection = (HttpURLConnection) (new…
TheDevMan
  • 5,914
  • 12
  • 74
  • 144
2
votes
2 answers

Loopj HTTP library session id cookie not working

I am using Loopj HTTP client to make my http requests to my server (http://loopj.com/android-async-http/). Requests are working perfectly. However, I am trying to implement sessions into the service. From the documentation, enabling cookies through…
Pacemaker
  • 1,117
  • 2
  • 17
  • 36
2
votes
2 answers

java.lang.IllegalArgumentException: Host name may not be null

Hello everyone I'm posting here my question bcz i've gone through all the post , but didn't get any help for my problem. I'm using jersey web service and trying to access through android phone via URL .I want to print hello message from web service…
2
votes
1 answer

File sent using HttpPost corrupted and/or truncated

I receive a file using the following code: byte[] fileBytes; .... JSONObject postJSON = new JSONObject(); postJSON.put("file_name", filename); postJSON.put("client_id", clientID); HttpPost post = new HttpPost(fileURL); StringEntity se = new…
Aharon Manne
  • 712
  • 3
  • 11
  • 34
2
votes
2 answers

Android download pdf to internal storage and launch intent

I am trying to download a pdf from the internet, store the file in internal storage and then launch the pdf in an intent. I keep getting "The document is empty (size 0KB)" when it launches the intent. class Pdf extends AsyncTask
user2229747
  • 221
  • 2
  • 20
2
votes
2 answers

How to parse HTML response in android

I am sending data to server using HttpPost in android which is successfully received by server. Now the server response is as follows:
Sam
  • 423
  • 2
  • 9
  • 23
2
votes
0 answers

TCP flow control APIs in Android

TCP flow control is used to control the rate of incoming data packets so that receiver of the traffic is not overwhelmed by the sender's rate. In other words, receiver can monitor this buffer size to indicate to the sender (or take some other…
2
votes
3 answers

Sending Json POST to server using name value pair

I am sending Json Post request to server to through url: http://www.xyz.com/login request structure: {"requestdata":{"password":"abc","devicetype":"phone","username":"amrit@pqr.com","locale":"in"},"requestcode":10} Code Snapshot: MainActivity: …
Amrit Pal Singh
  • 7,116
  • 7
  • 40
  • 50
2
votes
2 answers

Android Volley JsonRequest

I want to POST JsonObject from device to server using Volley but I couldn't find any code example. If you can please provide me with some references or some code example.
Jilberta
  • 2,836
  • 5
  • 30
  • 44