-
Notifications
You must be signed in to change notification settings - Fork 90
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
Lower minSdkVersion to 21 #96
Conversation
The Google Exposure Notification ref design also uses API Level 21: https://github.com/google/exposure-notifications-android/blob/master/app/build.gradle#L28 This is important, we need to target the widest number of devices possible. ping @simonroesch @gannimo |
Hi @jeffallen, thanks a lot for working on this! Would you be motivated to adapt this to the current state of the develop branch with the Google Exposure Notification Framework? For this version I would suggest, that we do a version switch and use the EncryptedSharedPreferences on API>=23 and normal SharedPreferences on API<23. With the Google framework there is only very little information in the SharedPreferences anyway and working with the KeyStore on Android 5 is an absolute pain. Although the APIs are there you will experience a lot of unexpected states, which would result in chaos. I guess this is also one of the reasons why the AndroidX EncryptedSharedPreferences are only available on 23+. |
But there is also this issue google/exposure-notifications-android#16 I would like to see an official answer from Google. |
I am still motivated to work on this, and I really like your proposed plan. (I worked hard to keep encryption before, since the secret key was in there.) The current tip of the https://github.com/google/exposure-notifications-android.git repo still only requires API 21. I was able to install it on my Android 5.1 phone, and then confirmed that it works, at least until it runs up against the "API not available on this phone�" error that you would expect from not being in the beta group. Likewise disassembling the AAR file shows that the minSDKVersion is less than 21. |
The Google Exposure Notification service works down to API 21, so the SDK should as well. Handle the missing EncryptedSharedPreferences by simply writing the preferences in cleartext when it is not available. Fixes DP-3T#16.
The latest version of this PR has been tested on an API 21 phone, and it works up to the point of getting the "API not available" error because this phone is not in the beta testing group for Exposure Notification. |
Ping @simonroesch ? I know you are super-busy with the pilot, but also we need to pilot this app on older phones too. |
Hi @jeffallen, sorry for keeping you waiting. According to the latest documentation from Google they currently need Android 6.0: https://static.googleusercontent.com/media/www.google.com/no//covid19/exposurenotifications/pdfs/Android-Exposure-Notification-API-documentation-v1.3.2.pdf Therefore this PR does not help at the moment. But let's keep it open hoping for Google to extend their support down to Android 5. |
The Google Exposure Notification service works down to
API 21, so the SDK should as well.
Handle the missing EncryptedSharedPreferences by simply
writing the preferences in cleartext when it is not available.
Fixes #16.