amplitude / Amplitude-Android

Native Android SDK for Amplitude
MIT License
164 stars 90 forks source link

Devices with TLS 1.0 and TLS 1.1 are being reported (Android 4.x) #389

Closed vladaman closed 9 months ago

vladaman commented 9 months ago

Expected Behavior

OkHttp should support TLS 1.0 and TLS 1.1

Current Behavior

Old devices that don't support TLS 1.0 and TLS 1.1 are not posting data to Amplitude REST API. Therefore, we are missing about 20% of events due to legacy devices that use Android 4.x.

Possible Solution

Provide the ability to inject custom OkHttpClient for those who require to track legacy clients or re-enable TLS 1.0 and TLS 1.1 on your REST API. See https://gist.github.com/Karewan/4b0270755e7053b471fdca4419467216

Mercy811 commented 9 months ago

Hi @vladaman, both https://api2.amplitude.com/ (endpoint used by Amplitude Android SDK) and https://api2.amplitude.com/2/httpapi (endpoint used by Amplitude Kotlin SDK) support only TLS 1.2. TLS 1.2 is supported starting from Android API level 16 (Android 4.1). the Android SDK is now in maintenance mode. We'd recommend to upgrade to the Kotlin SDK which uses HttpURLConnection rather than OkHttp.