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

Time to raise minSdkVersion? #1132

Closed
Fs00 opened this issue Nov 2, 2021 · 9 comments
Closed

Time to raise minSdkVersion? #1132

Fs00 opened this issue Nov 2, 2021 · 9 comments

Comments

@Fs00
Copy link
Contributor

Fs00 commented Nov 2, 2021

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.

@maniac103
Copy link
Collaborator

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...

@Fs00
Copy link
Contributor Author

Fs00 commented Nov 5, 2021

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?

@maniac103
Copy link
Collaborator

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...

@Fs00
Copy link
Contributor Author

Fs00 commented Nov 5, 2021

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.

@maniac103
Copy link
Collaborator

Looking at #857, I think that updating to API 21+ may be a good idea after all.

@maniac103
Copy link
Collaborator

Also OkHttp 3.12.x becomes unsupported at the end of the year: https://square.github.io/okhttp/security/

@Fs00
Copy link
Contributor Author

Fs00 commented Dec 1, 2021

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 @import CSS 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.

@xabolcs
Copy link

xabolcs commented Mar 6, 2022

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.

@Fs00
Copy link
Contributor Author

Fs00 commented Jun 11, 2023

Closing since the minSdkVersion has been bumped in #1166.

@Fs00 Fs00 closed this as completed Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants