gh4a
gh4a copied to clipboard
Time to raise minSdkVersion?
Currently, this app can be installed on devices down to Android 4.2. Considering that some notable libraries used by this app (namely OkHttp and RxJava) have dropped support for Android <5, in my opinion it would make sense to aim for a bump to minSdkVersion 21 sooner or later. It would also bring some neat benefits: no need for multidex and smaller APKs, since bitmap versions of vector drawables (for compatibility with pre-Lollipop devices) won't be bundled in the app.
We could start with a bump to minSdk 19, which should be painless and unlikely to affect more than a handful of users. Outdated 2020 Android distribution data showed that Android versions prior to 4.4 had the least amount of users (<2%), which should be even less today.
FWIW, our installation data in Google Play as of today:
- Android 11: 2356
- Android 10: 1429
- Android 9: 716
- Unknown (?): 424
- Android 8: 349
- Android 7: 256
- Android 6: 98
- Android 5: 99
- Android 4.4: 48
- Android 4.3: 3
- Android 4.2: 11
- Android 4.1: 1
So yeah, raising to API 19 (4.4) should not be a problem at all, but what will that buy us? AFAICT the real gains only start when bumping to API 21...
Thanks for the info @maniac103. Do these installation data reflect the number of users that have the app currently installed? That one installation on Android 4.1 seems weird considering that the current minSdk is 17... 🤔
So yeah, raising to API 19 (4.4) should not be a problem at all, but what will that buy us? AFAICT the real gains only start when bumping to API 21...
Agree, I've actually thought of the bump to API 19 as a preliminary step for the transition to API 21. We can then bump to API 21 in a subsequent version of the app or just bump from 17 to 21 in a single version.
A benefit I see in bumping, regardless of the API level, is that we can avoid the potential need for compatibility quirks (speaking of which, I've noticed that WebView on pre-KitKat devices uses a legacy engine with several behavior differences).
What do you think?
Do these installation data reflect the number of users that have the app currently installed?
Probably yes, but I believe users that are on older versions would also be counted ... I guess that's the case for that one user.
Agree, I've actually thought of the bump to API 19 as a preliminary step for the transition to API 21.
I'm not sure why there would be a need for an intermediate step here? In any case, I guess we should start by trying whether the app (or rather: talking to GitHub's HTTPS server) actually still works on those old versions. I have a feeling that GH might require TLS versions and/or root CA certificates that may not be available there...
I'm not sure why there would be a need for an intermediate step here?
To reduce the risk of regressions, but maybe that risk isn't actually that high...?
I have a feeling that GH might require TLS versions and/or root CA certificates that may not be available there...
GitHub requires TLS 1.2 since 2018, and Android supports it since API level 16. Although, according to this article, it seems that not all 4.1-4.4 devices are guaranteed to support TLS 1.2. About root certificates I don't know, but I haven't found anything after a quick Google search. But if it were the case, probably someone would have already pointed that out.
Looking at #857, I think that updating to API 21+ may be a good idea after all.
Also OkHttp 3.12.x becomes unsupported at the end of the year: https://square.github.io/okhttp/security/
Found other two good reasons to bump to SDK 21: 😃
- Retrofit isn't getting updated anymore for Android <5 (since almost two years ago, actually)
- starting from Android 5, WebView supports
@importCSS rule which would greatly help us reduce duplication in CSS stylesheets for different themes
Would you mind looking into doing the bump when you have some time? 🙏 I'd rather focus on other things at the moment.
FWIW, our installation data in Google Play as of today:
@maniac103 , does Google Play count F-Droid installs too? Does F-Droid have such numbers?
I migrated to F-Droid but Google Play still detects as installed.
Closing since the minSdkVersion has been bumped in #1166.