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
3
votes
4 answers

onSuccess(int, Header[], JSONObject) was not overriden, but callback was received

I am using android-async-http, and override all the onSuccess and onFailure method, but I got the error: onSuccess(int, Header[], JSONObject) was not overriden, but callback was received. …
Shuai Wang
  • 335
  • 1
  • 8
  • 20
3
votes
2 answers

Volley ignores Cookie header request

Good day! My app uses simple http client-server communication, established with Volley library on client side. First, i fire up an authorization request: public class AuthenticationRequest extends StringRequest { private static final String TAG…
3
votes
2 answers

AndroidHttpClient and HttpGet API deprecated in Android 6.0 Marshmallow (API 23)

Today I have updated android SDK API 23. As soon as I have changed my project to target Android SDK API 23, I started to get an error regarding Apache's client and AndroidHttpClient API in eclipse. Apache library API can no longer be found in API…
3
votes
1 answer

Uploading file array from android to $_FILES

I want to upload few files from my android code so that it is available in the $_FILES array. The server is looking for the files as an array. The php code in the server looks like for ($i=0;$i<$NumFiles;$i++){ ... $filename =…
Manoj Sreekumar
  • 680
  • 3
  • 14
  • 30
3
votes
1 answer

Android HttpClient response

I'm trying to send json data to a php script from my Android application with HttpClient, and get the response. Android Code private void sendPurchase(String SKU) throws IOException{ Log.e("sendPurchase","Inside sendPurchase"); final…
3
votes
2 answers

Which httpmime version can I use with Android's HttpClient?

I need to upload files using Android's HttpClient. Unfortunately, Android doesn't include MultipartEntity, so I must using Apache's httpmime library. I don't want to incur possible conflicts between the Android's HttpClient and the official…
Heath Borders
  • 30,998
  • 16
  • 147
  • 256
3
votes
1 answer

HTTP Requests in Glass GDK

I am implementing a GDK application and need to do in my application some HTTP Post requests. Do I send the HTTP requests the same way as on android phone or there is some other way of doing it? (I have tried the code that I am using on my phone and…
lucy
  • 65
  • 8
3
votes
2 answers

Why does this background task fail with a fatal exception?

The following code in my MainActivity is failing with a fatal exception in the overridden doInBackground() method: public class MainActivity extends ActionBarActivity { . . . public void onFetchBtnClicked(View v){ if(v.getId() ==…
3
votes
2 answers

Post large files in android to server

I have to send large files of greater than 10MB to server from an android application. It gives me OutOfMemory exception for large files. I have tried out so many solutions but nothing works. Here is my code which works for small files. …
Sam
  • 423
  • 2
  • 9
  • 23
3
votes
3 answers

Cache data locally waiting for an internet connection in Android

I am working on an app where I need to POST data(a JSON string) to a web server. I am doing this using the Apache HTTP Client(attached code below). When there is an internet connection everything works fine, but the project spec needs me to cache…
DrkStr
  • 1,752
  • 5
  • 38
  • 90
3
votes
2 answers

Using @Rest In Android Annotations to Make Multipart Post

I am sending a multipart request to a server which will include an image, as well as a couple of strings. I haven't found any guide on how to get this done, all i have found are just how to make post and get and put etc, but nothing on multipart. I…
SamAko
  • 3,485
  • 7
  • 41
  • 77
3
votes
1 answer

Android HttpClient issue setting Content-Length

I tried to create a post with the following... HttpPost httppost = new HttpPost(URL); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); httppost.setHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE); String length =…
Jackie
  • 21,969
  • 32
  • 147
  • 289
3
votes
2 answers

Socket closed exception when trying to read httpResponse

I have a method to connect to send post data to a webservice and get the response back as follow: public HttpResponse sendXMLToURL(String url, String xml, String httpClientInstanceName) throws IOException { HttpResponse response = null; …
Distwo
  • 11,569
  • 8
  • 42
  • 65
3
votes
1 answer

Android Volley Library doen't return whole response data

Volley library doesn't return whole response data. It only return the part of the response data. I am calling drupal services. Below is my code for it. public void BoardRoomRequest() { pdialog = new ProgressDialog(BoardRoom.this); …
Megha
  • 631
  • 7
  • 11
3
votes
1 answer

Connecting to a secure server via http android

I am trying to connect to authenticate and connect to a secure server but it fails and toast to Throwable t. Here is my http connection code // Log.i(getClass().getSimpleName(), "send task - start"); HttpParams httpParams =…
Dimitri
  • 677
  • 3
  • 19
  • 46