Cash App Feb 5, 2019

OkHttp 3.13 Requires Android 5+

Article Summary

Jesse Wilson explains why Square is cutting off 11% of Android devices with OkHttp 3.13. Spoiler: your web servers might break too.

Jesse Wilson from Square announced OkHttp 3.13, a major update that drops support for older Android versions and Java 7. The change aligns with industry-wide moves by Google, Mozilla, Microsoft, and Apple to require TLSv1.2 as the minimum security standard by early 2020.

Key Takeaways

Critical Insight

OkHttp is proactively enforcing TLSv1.2 as the minimum security standard, cutting off Android 4.x support to protect user data before major browsers do the same in 2020.

The article includes specific migration steps and a workaround for teams that absolutely must support TLSv1.2 on Android 4.x devices.

About This Article

Problem

OkHttp needed to enforce TLSv1.2 as the minimum standard to match requirements set by Google, Mozilla, Microsoft, and Apple in early 2020. This meant requiring Android 5.0 (API 21) as the baseline.

Solution

Jesse Wilson's team created a maintenance branch for OkHttp 3.12.x to support Android 4.x devices. They also added configuration options like ConnectionSpec.COMPATIBLE_TLS for servers that couldn't upgrade right away.

Impact

Developers can upgrade by setting minSdkVersion to 21 and configuring Java 1.8 compatibility in build.gradle. They'll need to update to OkHttp 3.13.1. The 3.12.x branch remains available through December 2020 for those who need backward compatibility.