DP-3T / gaenlib

0 stars 1 forks source link

Location access permissions should be requested interactively #14

Closed cgrigis closed 4 years ago

cgrigis commented 4 years ago

The app requires ACCESS_FINE_LOCATION and ACCESS_BACKGROUND_LOCATION permissions in order to be able to perform Bluetooth scans, and fails silently (except from errors in logcat) if they are not granted. These must currently be added by hand (Settings - Apps - Permissions - ...), but should be properly requested and granted interactively.

cgrigis commented 4 years ago

See e.g. https://github.com/HexHive/GAENScan/blob/master/app/src/main/java/ch/epfl/hexhive/gaenscan/MainActivity.java#L88

cgrigis commented 4 years ago

Calibration app: https://github.com/c4dt/dp3t-sdk-android/commit/8ee78b5cb9a25ccb81913d98b92ff272a7110f26 Main app: https://github.com/c4dt/dp3t-app-android-ch/commit/0321c574747724512bbb6eb2c233caabf88f00dc

ineiti commented 4 years ago

Is this something that should be backported to the original app?

cgrigis commented 4 years ago

As I understand it, GAEN does not use these permissions and has its own preferences and mechanisms of access to resources, so it does not need this. In our case, we access Bluetooth as a "user" resource, which is protected by system permissions that have to be explicitly granted.