Closed JordanLongstaff closed 4 years ago
How do you support it on devices that don't run play services?
How do you support it on devices that don't run play services?
Google Play Services doesn't seem to matter. When I run the app, I get a notification saying, "[Your app] won't run unless you update Google Play services." Yet it runs fine and I'm able to log in to our server with no problems.
As a formality, I disabled, and then force stopped, Google Play Services. I also cleared all data from Play Services, uninstalled and reinstalled the app, and restarted the phone. Still no problems running the app and logging in.
OkHttp 3.12.x is our branch for apps targeting Android 4.x.
If you’d like to maintain an OkHttp fork that supports old Androids, please do! We will also enthusiastically encourage people to use your fork if it is high quality!
There are already over 8,000 forks of this project. I don't have time to look at every one to see if any of them fix my problem. Are there any that you know that you can "enthusiastically encourage" me to use?
As far as I know, you’d be the first.
I'm missing some of the nuance of this discussion. Is the request for
a) an OkHttp version that supports TLSv1.2 on Android 16 -> This is OkHttp 3.12.x or b) Avoid eagerly failing OkHttp 4.x on unsupported versions, so against the requirements people can try to use it anyway.
That post (https://medium.com/tech-quizlet/working-with-tls-1-2-on-android-4-4-and-lower-f4f5205629a) you linked to is out of date. OkHttp 3.12.12 does support Android 16, and does negotiate TLSv1.2. There should be no situation where Tls12SocketFactory is actually useful.
A recent version of OkHttp made improvements to the Android platform detector, so that it correctly identifies an Android device if it is running on one. However, these same improvements make my app crash on startup because it cannot start up a NetworkClient because the Android platform detector is expecting an API version >= 21.
Please support TLS 1.2 in Android API 16-20 in your latest versions. #2372 already explained that those Android APIs support TLS 1.2 and demonstrated how TLS 1.2 can be used with those APIs, and your explanation for requiring API 21 as your minimum version even contains a link to this post explaining how to enable TLS 1.2 on older APIs. As far as I'm concerned, the bump to Android 5+ was needless and caused more problems than it solved.