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

Lower minSdkVersion to 21 #96

Closed
wants to merge 2 commits into from
Closed

Conversation

jeffallen
Copy link
Contributor

@jeffallen jeffallen commented May 5, 2020

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.

@jeffallen
Copy link
Contributor Author

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

@simonroesch
Copy link
Contributor

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

@simonroesch
Copy link
Contributor

But there is also this issue google/exposure-notifications-android#16 I would like to see an official answer from Google.

@jeffallen
Copy link
Contributor Author

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.
@jeffallen
Copy link
Contributor Author

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.

@jeffallen
Copy link
Contributor Author

Ping @simonroesch ? I know you are super-busy with the pilot, but also we need to pilot this app on older phones too.

@simonroesch
Copy link
Contributor

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.

@jeffallen jeffallen closed this Oct 23, 2021
@jeffallen jeffallen deleted the issue16 branch October 23, 2021 19:09
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

Successfully merging this pull request may close these issues.

minSdkVersion as low as possible
2 participants