Unnecessary "Activate Location Setting" onboarding message on Android 11
See original GitHub issueAvoid duplicates
- Bug is not mentioned in the FAQ
- Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
- Bug is not already reported in another issue This is a follow-on from the closed issue https://github.com/corona-warn-app/cwa-app-android/issues/986 regarding a sub-problem reported by @MikeJayDee in https://github.com/corona-warn-app/cwa-app-android/issues/986#issuecomment-712168348.
Describe the bug
In the screen “How to Enable Exposure Logging”, which is displayed as part of the onboarding process, the following text is always displayed.
In Android 11 (API 30), and above, Google has made an exception for their Exposure Notifications System and it is not required for the location setting to be enabled, therefore this text should not appear for this version of Android.
Expected behavior
In Android 11 (API 30) and above, the information about location access should not be displayed. The Google Exposure Notifications System does not require the device’s location setting to be enabled in order to use Bluetooth Low Energy. See https://support.google.com/android/answer/9930236.
(In Android 10 (API 29) and below, the text should continue to be displayed. The translation error for the English-language text (covered in https://github.com/corona-warn-app/cwa-app-android/issues/2345) is planned to be fixed in 1.13.x was fixed in 1.13.2. There is a follow-on text issue in https://github.com/corona-warn-app/cwa-app-android/issues/2506.)
Steps to reproduce the issue
For Android 11:
- CWA > three-dot icon > Settings > Reset App and confirm
- Tap “LET’S GET STARTED”
- Tap “NEXT”
- On screen “How to Enable Exposure Logging” scroll down to the section under “The following countries currently participate” and note the information about “Allow location access”.
Technical details
- Android version: 11 (API 30)
- Mobile device: Pixel 3a emulator
- CWA version:
1.12.01.14.3 - ENS version: 18210214000
Possible Fix
Do not display “Allow location access” “Activate location access” for Android 11 during onboarding, using dynamic setting for visibility of id/onboarding_location_card
?
onboarding_tracing_location_headline
and onboarding_tracing_location_body
are used in layout\fragment_onboarding_tracing.xml
Note also https://developers.google.com/android/exposure-notifications/implementation-guide#locationless_scanning_in_android_11 which refers to advises the use of getStatus() to determine the need to enable the location setting.deviceSupportsLocationlessScanning()
which is already used in de\rki\coronawarnapp\nearby\modules\locationless\DefaultScanningSupport.kt
Additional context
FAQ https://www.coronawarn.app/en/faq/#android_location is currently inaccurate concerning Android 11 in the main article, although the links to the Google pages correctly describe the differences between Android 10 and below compared with Android 11. (See https://github.com/corona-warn-app/cwa-website/issues/539.)
Fixed by https://github.com/corona-warn-app/cwa-website/pull/550.
Edit: Updated to correspond to app state for 1.14.3
Internal Tracking ID: EXPOSUREAPP-3618 related to Internal Tracking ID: EXPOSUREAPP-2025
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:29 (29 by maintainers)
Top GitHub Comments
@dsarkar
If the new advice given by Google (see https://github.com/corona-warn-app/cwa-app-android/issues/1541#issuecomment-788767684) is followed then the getStatus() method should be used, which however only determines if the location setting needs to be enabled. Unlike deviceSupportsLocationlessScanning() it does not determine whether the platform generally is dependent on location setting being enabled in order to use Bluetooth Low Energy.
The v1.8 release notes say:
Deprecation of deviceSupportsLocationlessScanning()
“deviceSupportsLocationlessScanning() is deprecated in favor of the getStatus() API, which provides more details about whether Exposure Notifications can currently be supported on the device.”
so possibly this bug report / enhancement request should be deferred in favour of an enhancement to the related text strings which I posted in https://github.com/corona-warn-app/cwa-app-android/issues/2506.
@MikeMcC399 Just forwarding a “Thanks” from a developer to you for this hint!