You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Winkler, Florian" <fl...@sap.com> on 2015/12/18 00:00:13 UTC

Apache HTTP Client for Android

Hi there,

I read about the Android port for HTTP Client, and I also read that it is discontinued since on Android platform v23 Google chose to remove the old HTTP Client classes.
I furthermore read that people targeting Android 23+ should resort to Marek Sebera's client port (https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html).

I'd rather like to use the official Apache version of HTTP client (4.5.1). I therefore set up an Android project for platform v23 and thought "Hey, if Google removed all old HTTPClient classes, then I should at least have a chance adding the new Apache 4.5.1 ones as 3rd party dependencies."
However, that is not the case. Turns out, some old classes are still on Android platform v23 (e.g. HttpParams), and when I try to add dependencies to Apache HTTPClient 4.5.1 to the gradle script, I get an error:


WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.1 is ignored for debug as it may be conflicting with the internal version provided by Android.

         In case of problem, please repackage it with jarjar to change the class packages


Honestly, I do not get it. Is this a problem of Google now, is this a problem of the Apache HTTP Client, and why is a project discontinued that still seems to be very relevant for Android's platform v23?


Any explanations on this topic are very much appreciated.


Thanks,


Florian
_______________________________________________________________________________

Florian Winkler
Development Architect   I   P&I Industry Cloud – Mobility
SAP SE   I   Dietmar-Hopp-Allee 16   I   69190 Walldorf   I   Germany
 T +49 6227 7-52607   I   F +49 6227 78 56076   I   E-Mail: f<ma...@sap.com>
<http://www.sap.com/>www.sap.com<http://www.sap.com/>


Re: Apache HTTP Client for Android

Posted by Alexey Panchenko <al...@gmail.com>.
Hi Florian,

Looking at
http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
it seems like it is still around, just hidden by default.
I wouldn't expect it to be completely removed from Android for a few more
years.

Regards,
Alex

On Fri, Dec 18, 2015 at 5:00 AM, Winkler, Florian <fl...@sap.com>
wrote:

> Hi there,
>
> I read about the Android port for HTTP Client, and I also read that it is
> discontinued since on Android platform v23 Google chose to remove the old
> HTTP Client classes.
> I furthermore read that people targeting Android 23+ should resort to
> Marek Sebera's client port (
> https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html).
>
> I'd rather like to use the official Apache version of HTTP client (4.5.1).
> I therefore set up an Android project for platform v23 and thought "Hey, if
> Google removed all old HTTPClient classes, then I should at least have a
> chance adding the new Apache 4.5.1 ones as 3rd party dependencies."
> However, that is not the case. Turns out, some old classes are still on
> Android platform v23 (e.g. HttpParams), and when I try to add dependencies
> to Apache HTTPClient 4.5.1 to the gradle script, I get an error:
>
>
> WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.1 is ignored
> for debug as it may be conflicting with the internal version provided by
> Android.
>
>          In case of problem, please repackage it with jarjar to change the
> class packages
>
>
> Honestly, I do not get it. Is this a problem of Google now, is this a
> problem of the Apache HTTP Client, and why is a project discontinued that
> still seems to be very relevant for Android's platform v23?
>
>
> Any explanations on this topic are very much appreciated.
>
>
> Thanks,
>
>
> Florian
>
> _______________________________________________________________________________
>
> Florian Winkler
> Development Architect   I   P&I Industry Cloud – Mobility
> SAP SE   I   Dietmar-Hopp-Allee 16   I   69190 Walldorf   I   Germany
>  T +49 6227 7-52607   I   F +49 6227 78 56076   I   E-Mail: f<mailto:
> florian.winkler@sap.com>lorian.winkler@sap.com<mailto:
> florian.winkler@sap.com>
> <http://www.sap.com/>www.sap.com<http://www.sap.com/>
>
>

Re: Apache HTTP Client for Android

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2015-12-18 at 10:09 +0000, Winkler, Florian wrote:
> Hi Oleg,
> 
> that sounds very promising. I would love to see a version of HC running
> smoothly out of the box on Android - no modifications involved.
> In the meantime, which would be the smartest way to expose HC 4.3.5.1 to
> my users?
> I am trying to write an SDK which exposes an HTTP layer. I would like to
> base that layer on Apache HC, so I am thinking to expose the following two
> interfaces:
>  
> - HTTPClient
> - HTTPContext
> 
> These are currently the only interfaces I need to expose to still allow
> users of my SDK to tailor the HTTP connectivity to their special needs.
> Will these interfaces be stable / available by the same package name in HC
> 5?
> If so, I could keep my API compatible when switching to HC 5 once it is
> available.
> 

Florian,
Both interfaces will be present in 5.x but I cannot commit to anything
more specific at this point.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Apache HTTP Client for Android

Posted by "Winkler, Florian" <fl...@sap.com>.
Hi Oleg,

that sounds very promising. I would love to see a version of HC running
smoothly out of the box on Android - no modifications involved.
In the meantime, which would be the smartest way to expose HC 4.3.5.1 to
my users?
I am trying to write an SDK which exposes an HTTP layer. I would like to
base that layer on Apache HC, so I am thinking to expose the following two
interfaces:
 
- HTTPClient
- HTTPContext

These are currently the only interfaces I need to expose to still allow
users of my SDK to tailor the HTTP connectivity to their special needs.
Will these interfaces be stable / available by the same package name in HC
5?
If so, I could keep my API compatible when switching to HC 5 once it is
available.

Thanks a bunch,

Florian

___________________________________________________________________________
____

Florian Winkler
Development Architect   I   P&I Industry Cloud ­ Mobility
SAP SE   I   Dietmar-Hopp-Allee 16   I   69190 Walldorf   I   Germany
 T +49 6227 7-52607   I   F +49 6227 78 56076   I   E-Mail: f
<ma...@sap.com>lorian.winkler@sap.com
<ma...@sap.com>
 <http://www.sap.com/>www.sap.com <http://www.sap.com/>






On 18/12/15 10:56, "Oleg Kalnichevski" <ol...@apache.org> wrote:

>On Thu, 2015-12-17 at 23:00 +0000, Winkler, Florian wrote:
>> Hi there,
>> 
>> I read about the Android port for HTTP Client, and I also read that it
>>is discontinued since on Android platform v23 Google chose to remove the
>>old HTTP Client classes.
>> I furthermore read that people targeting Android 23+ should resort to
>>Marek Sebera's client port
>>(https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html).
>> 
>> I'd rather like to use the official Apache version of HTTP client
>>(4.5.1). I therefore set up an Android project for platform v23 and
>>thought "Hey, if Google removed all old HTTPClient classes, then I
>>should at least have a chance adding the new Apache 4.5.1 ones as 3rd
>>party dependencies."
>> However, that is not the case. Turns out, some old classes are still on
>>Android platform v23 (e.g. HttpParams), and when I try to add
>>dependencies to Apache HTTPClient 4.5.1 to the gradle script, I get an
>>error:
>> 
>> 
>> WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.1 is
>>ignored for debug as it may be conflicting with the internal version
>>provided by Android.
>> 
>>          In case of problem, please repackage it with jarjar to change
>>the class packages
>>
>> 
>> Honestly, I do not get it. Is this a problem of Google now, is this a
>>problem of the Apache HTTP Client, and why is a project discontinued
>>that still seems to be very relevant for Android's platform v23?
>> 
>> 
>> Any explanations on this topic are very much appreciated.
>> 
>
>One can still run HttpClient Android 4.3.5.1 on Android 23+ instead of
>Marek Sebera's port, but there will be no official ports of HC 4.4 or
>4.5. It is just not worth it. Our focus will be on making sure that HC
>5.0 can run without modifications on newer versions of Android.
>
>Oleg
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>For additional commands, e-mail: httpclient-users-help@hc.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Apache HTTP Client for Android

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2015-12-17 at 23:00 +0000, Winkler, Florian wrote:
> Hi there,
> 
> I read about the Android port for HTTP Client, and I also read that it is discontinued since on Android platform v23 Google chose to remove the old HTTP Client classes.
> I furthermore read that people targeting Android 23+ should resort to Marek Sebera's client port (https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html).
> 
> I'd rather like to use the official Apache version of HTTP client (4.5.1). I therefore set up an Android project for platform v23 and thought "Hey, if Google removed all old HTTPClient classes, then I should at least have a chance adding the new Apache 4.5.1 ones as 3rd party dependencies."
> However, that is not the case. Turns out, some old classes are still on Android platform v23 (e.g. HttpParams), and when I try to add dependencies to Apache HTTPClient 4.5.1 to the gradle script, I get an error:
> 
> 
> WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
> 
>          In case of problem, please repackage it with jarjar to change the class packages
>
> 
> Honestly, I do not get it. Is this a problem of Google now, is this a problem of the Apache HTTP Client, and why is a project discontinued that still seems to be very relevant for Android's platform v23?
> 
> 
> Any explanations on this topic are very much appreciated.
> 

One can still run HttpClient Android 4.3.5.1 on Android 23+ instead of
Marek Sebera's port, but there will be no official ports of HC 4.4 or
4.5. It is just not worth it. Our focus will be on making sure that HC
5.0 can run without modifications on newer versions of Android.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org