question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary "Activate Location Setting" onboarding message on Android 11

See original GitHub issue

Avoid duplicates

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.

Activate Location Setting EN DE

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:

  1. CWA > three-dot icon > Settings > Reset App and confirm
  2. Tap “LET’S GET STARTED”
  3. Tap “NEXT”
  4. 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.0 1.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 deviceSupportsLocationlessScanning() which is already used in de\rki\coronawarnapp\nearby\modules\locationless\DefaultScanningSupport.kt advises the use of getStatus() to determine the need to enable the location setting.

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:29 (29 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeMcC399commented, Mar 2, 2021

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

1reaction
dsarkarcommented, Mar 2, 2021

@MikeMcC399 Just forwarding a “Thanks” from a developer to you for this hint!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage your Android device's location settings - Nexus Help
Android 11 & lower · Swipe down from the top of the screen. · Touch and hold Location . If you don't find...
Read more >
Safer and More Transparent Access to User Location
Now in Android 11, we're giving users even more control with the ability to grant a temporary “one-time” permission to sensitive data like ......
Read more >
Location updates in Android 11
In order to enable background location access, users must set the Allow all the time option for your app's location permission on a...
Read more >
Android 11 Server Certificate Validation Error and Solution
This implies that server certificate validation will be required for other operating systems in the future. While the change itself is a minor ......
Read more >
Exposure Notifications implementation guide | Google API for ...
The requirement to have location enabled has been a source of confusion for some users. Android 11 introduced a change that allows users...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found