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
1 answer

Getting the calling fragment within an asynchronous task

Aim In a fragment, I have a search bar which looks for online news about what the user typed. I would want to display these news (title + description + date of publication + ... etc.) in the GUI, as vertical blocks. Implementation Explanations In…
2
votes
0 answers

System.err: javax.net.ssl.SSLPeerUnverifiedException: Hostname XXX not verified even after adding in network-security-config

I have added network security config in manifest, but I am still getting hostname not verified error. android:networkSecurityConfig="@xml/network_security_config"
2
votes
1 answer

Xamarin Native Android HttpClient, where is it located?

When i select the native implementation for the HttpClient in Visual Studio like: And i use the HttpClient in my code. where does the HttpClient code live ? Is it in a native Android library ? Or is it in the Google Play Services ? Where could…
clogwog
  • 343
  • 2
  • 13
2
votes
1 answer

Android Sending PDF to server using Volley

I wanna send a PDF file stored in internal storage ( InternalStrorage/PDF/OCK.pdf ) I already sent String Data to my php server using Android Volley without problems via this function: private void upload(){ StringRequest stringRequest = new…
Style5000
  • 33
  • 8
2
votes
0 answers

Android Session management with Spring

I need to maintain a session for below REST API call from Android app. I'm able to call these API using volley, But the session is not being maintained. I first call validateUser API to validate the user and store his email in session. Then I need…
2
votes
0 answers

android app crashed while initiating lopoj AsyncHttpClient in Main activity

I need to get some data from external server in an android app. for that i use com.loopj.android:android-async-http:1.4.9 But my app crashed while initiating client in MainActivity private MyClient client; protected void onCreate(Bundle…
Forhad
  • 21
  • 5
2
votes
1 answer

Best way to send large data to server in Android

I have zip file in my sdcard,size is 8-9 mb.I'm using this library to send data. https://github.com/loopj/android-async-http and this is my source private void sendSubmitRequest(File file) { AsyncHttpClient client = new AsyncHttpClient(); …
BekaKK
  • 2,173
  • 6
  • 42
  • 80
2
votes
0 answers

TiHTTPClient: (java.net.ProtocolException): exceeded content-length limit of 439 bytes

When submitting a POST request using the HTTPClient for user's authentification in my android app version, i got an error : TiHTTPClient: (java.net.ProtocolException): exceeded content-length limit of 439 bytes this is the request code : var xhr…
Bardelman
  • 2,176
  • 7
  • 43
  • 70
2
votes
2 answers

Cannot import AndroidHttpClient;

I'm learning android restful web services using a 2014 tutorial by Lynda. The code uses this httpManager class : import android.net.http.AndroidHttpClient; public class HttpManager { public static String getData(String uri) { …
Karlom
  • 13,323
  • 27
  • 72
  • 116
2
votes
1 answer

Android see HTTP like in Chrome dev tool

Is there a way to see my app HTTP traffic like in the Chrome development tool for websites? I want to see the requests and the responses. I tried the DDMS network tools but it shows only the amount of network and not the data(requests and the…
Zeev G
  • 2,191
  • 21
  • 37
2
votes
3 answers

Unable to set headers in HttpsUrlConnection in AndroidApp

I am creating an HttpsUrlConnection from a URL class. I am adding some header fields in the connection using the setRequestPropety method as demonstrated in following code. URL url = new URL(address); HttpURLsConnection connection =…
Simon.Hermit
  • 89
  • 2
  • 9
2
votes
1 answer

android-async-http always onFailure (status code = 0), but DefaultHttpClient is all right

I am try to use android-async-http, but always onFailure, and from the log I can see the status code = 0. However, when I use the traditional way (org.apache.http.client.HttpClient), the status code = 200; the code: public class HttpTestActivity…
Shuai Wang
  • 335
  • 1
  • 8
  • 20
2
votes
0 answers

HTTPS Keep-Alive to reduce handshake time

So I have an app that make several requests to the server on a button click. I noticed there's HTTPS handshake overhead for every single call. How can I re-use the connection in this case so there's no need of handshake overhead on each…
Kagawa
  • 1,319
  • 2
  • 21
  • 33
2
votes
5 answers

Http methods deprecated warning in android studio

I am trying to make some http request with parameters. Currently I am using private List mParams = new ArrayList(); private DefaultHttpClient mHttpClient; private HttpPost mHttpPost; these for making http request…
dev
  • 1,085
  • 4
  • 19
  • 26
2
votes
3 answers

Android "TAKE PHOTO" - Image which is clicked is getting saved as a corrupt image

I have a button, which opens up a dialog box asking user to either "Take Picture" or "Choose from gallery". I am facing issues when user "Take photo" , image is getting clicked, and for verification purpose I am setting Bitmap image inside the…