Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] [kotlin-client] Add support for OkHttp3 to support Android API 4.X #4007

Closed
4brunu opened this issue Oct 1, 2019 · 0 comments · Fixed by #4008
Closed

[REQ] [kotlin-client] Add support for OkHttp3 to support Android API 4.X #4007

4brunu opened this issue Oct 1, 2019 · 0 comments · Fixed by #4008

Comments

@4brunu
Copy link
Contributor

4brunu commented Oct 1, 2019

Is your feature request related to a problem? Please describe.

In #3504 the version of OkHttp version was bumped from 3.14.2 to 4.0.1.

This has a side effect that the Kotlin-client no longer supports Android 4.X version, it only supports Android 5.0 and upwards, because OkHttp 4.X only supports Android 5.0 and upwards.
https://github.com/square/okhttp/blob/master/README.md#requirements

But the Android 4.X version still represents 10% of all Android devices, and some companies still need to support those devices.
https://developer.android.com/about/dashboards/

I'm not sure if this change was an accident, but it would be great if Kotlin-client supports Android 4.X.

Describe the solution you'd like

The solution that I propose Is to support both OkHttp 3 and 4 and give the flexibility to the user to choose which one is best for them.

Describe alternatives you've considered

There are two other alternatives:

  • Support only OkHttp3 and drop OkHttp4 and this would allow to support Android 2.3.X +.
  • Continue to support only OkHttp4 and support only Android 5.X +, and drop support for 10% of all Android. Not ideal to a lot of companies.

I think that support both OkHttp3 and OkHttp4 is the preferable approach because of the flexibility it gives and it shouldn't create a lot complexity.

Additional context

Check the Android versions market share for more context.
https://developer.android.com/about/dashboards/

And also the OkHttp readme.
https://github.com/square/okhttp/blob/master/README.md#requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant