DP-3T / dp3t-app-android-demo

The DP3T-App for Android
Mozilla Public License 2.0
323 stars 79 forks source link

Why does Min SDK Target require Android 6? #21

Open jeffallen opened 4 years ago

jeffallen commented 4 years ago

As the owner of an Android 5.1 (Lollipop, API = 22) phone, I was disappointed to see this app requires Android 6 (API 23) or higher.

I started digging into what requires this. I reduced the minSdkVersion to 22, and I found that there were some incompatibilities that could be worked around (i.e. EncryptedSharedPreferences from android.security, which requires API >= 23). I also noticed that all the calls to the power management optimisation whitelist stuff (i.e. android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, etc) fail, because they require Android 6. But I think that perhaps on Android 5.1, you could just skip that stuff, because maybe there is less power management going on?

What I expected to find was that there was some showstopper related to Bluetooth LE not being implemented in Android 5.1, but I didn't see any indication of that.

So my question is, how did you choose API 23 as the minimum, and are you willing to consider PRs that can lower the API level to 22, so as to pick up Android 5.1 phones? The global share of 5.1 phones is still around 11% (https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/), though it is less than 4% in Switzerland.

akuckartz commented 4 years ago

One criterion might be how supported the Android version is. 5.x seems to be no longer supported (bug fixes, security patches). But 6.x is not much better. Maybe the app should show a warning in such situations?

jeffallen commented 4 years ago

See also: https://github.com/DP-3T/dp3t-sdk-android/issues/16