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

BLE scanner may not work without location enabled #61

Open
vtoubiana opened this issue Sep 24, 2020 · 0 comments
Open

BLE scanner may not work without location enabled #61

vtoubiana opened this issue Sep 24, 2020 · 0 comments

Comments

@vtoubiana
Copy link

I noticed that the app is requesting the location permission but it does not check at runtime that location is enabled. However, according to google (see : https://blog.google/inside-google/company-announcements/update-exposure-notifications ) location has to be enabled to start a BLE scan.

Whereas the android documentation suggest that asking for the location permission is enough, all BLE scanner apps do require that the location is also enabled. This is also true for the contact tracing applications that are built on top of the Exposure Notification API. Apparently, the behavior is not the same on all Android devices: role-model phones will not run scan with location disabled whereas other phones may (https://www.polidea.com/blog/a-curious-relationship-android-ble-and-location/).

Therefore, the runService function should not only check the Bluetooth is enabled, it should also check that location is enabled (https://github.com/opentrace-community/opentrace-android/blob/e8b68321d1c567f45898744c7210323c1660df6f/app/src/main/java/io/bluetrace/opentrace/services/BluetoothMonitoringService.kt).

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

No branches or pull requests

1 participant