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
0
votes
2 answers

Problem with using httpclient for fetching data

I want to use httpclient in my android app. I know this library is deprecated a long time ago but I want to use it for some reason. When I write some code to fetch JSON data from an URL the emulator fetching me this: image this is my code : public…
0
votes
0 answers

Server returns error code 400, but works perfectly in localhost in HTTP request

I am making a HttpRequest to upload 3 images and some params.i have given the code below. Everything is working fine when i make request with localhost, but When i make request with an external server the server returns CODE 400 This my code for…
0
votes
2 answers

How to check from a web if the versionName of apk with the installed apk at device it is the same or not in Android Studio

I am trying to check at runtime if there is a new version of the app from an url. I have deployed the app at the online domain which is something like this www.test.com/androidapp/app_debug.apk and this automatically downloads my app. What I am…
TheCoderGuy
  • 771
  • 6
  • 24
  • 51
0
votes
0 answers

android - retrofit return null on some phones

It's very weird, my code works fine on android below 8, it works fine on some phones with android 8 but on some samsung with android 8, it returns null / This is my code : getHomePage = ApiConnection.client.create(GetHomePage::class.java) …
Navid Abutorab
  • 1,667
  • 7
  • 31
  • 58
0
votes
0 answers

Multipart request for sending image to server is not working

I've made multipart request to server for sending images from phone gallery according to tutorial, but I don't know what is wrong with it. Server will return 201 response code, but image is not sent correctly to the server. Here is the HTTPRequest…
martin1337
  • 2,384
  • 6
  • 38
  • 85
0
votes
0 answers

how to add http connectivity Checker to Android app?

I'm using Retrofit2 in my app and the problem is when my app is starting if app was unable to access internet, app will crash and terminate. so i've fixed this issues with connection checker, but it's only check if internet or wifi is connected or…
0
votes
1 answer

How to intercept the default 200 response sent from HttpResponse?

I need to send a response based on a flag(loginStatus), however, before this, a default 200 response is being sent. How do I intercept the response ? private void handlePost(HttpRequest request, HttpResponse response) { …
user10179187
  • 99
  • 1
  • 1
  • 6
0
votes
1 answer

Gradle sync failed: Could not find com.google.http-client:google-http-client-parent:1.24.1. Searched in the following locations:

I'm trying to build project with Gradle 3.1.3 so I'm getting this error from few minutes ago, I have nothing added new Dependancies or Librabries and My Android Studio version is 3.1.3 Sync error: Could not find…
0
votes
0 answers

how to solve Program type already present: org.apache.http.auth.AuthSchemeProvider?

The below gradle files are i have used in my application. It works fine with api level 23 but when i update from 23 to 26 i faced this issue. Please help me to resolve this. // Top-level build file buildscript { repositories { …
0
votes
0 answers

How to find what cause java.net.SocketTimeoutException so often with my Android app?

I have a problem and I don't know how to get rid of it. Sometimes (that's the main problem, it's just sometimes) I have this exception : 07-23 01:18:14.198: W/System.err(31750): java.net.SocketTimeoutException 07-23 01:18:14.198:…
zeus
  • 12,173
  • 9
  • 63
  • 184
0
votes
1 answer

Unable to upload strings with httpClient to my SSL server

I am trying to upload some text to my server using a php web service, with my server having an ssl certificate. When I try another server which doesn't have ssl, it works properly. Can anyone help me in resolving this problem? I have spent all day…
0
votes
1 answer

HttpConnection Error 500

Now I want to add some data to the server using Http Request when i add this data with hardCoded value it works will and give me a Response code 200 but when it come from the user it comes with 500 response code and error The code of http request…
0
votes
0 answers

NetHttpClient and SocketTimeoutException

I have an android app that is working through wifi and connect only to a local server. Normally the internet must be very fast and everything must work fine, however often i have some SocketTimeoutException : 06-14 01:40:38.141: W/System.err(30529):…
zeus
  • 12,173
  • 9
  • 63
  • 184
0
votes
1 answer

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate on HttpClient but works fine with HttpUrlConnection

Previously,I used HttpClient for a http post request and it was working fine, until I believe the server team made some changes. Then I kept getting javax.net.ssl.SSLPeerUnverifiedException: No peer certificate Exception. Then, after alot of…
Nishan Khadka
  • 385
  • 1
  • 2
  • 14
0
votes
0 answers

Set HttpClient local port on android app

Im my Android app I have a client which has to perform several HTTP requests per second to a server. I achieve this as follows: public class myclient implements Runnable { private HttpClient httpClient = null; private…