fengqiangboy / flutter-nordic-dfu

Flutter Nordic dfu
MIT License
109 stars 76 forks source link

Why is ACCESS_COARSE_LOCATION required ? Is it possible to avoid it ? #28

Closed xurei closed 3 years ago

xurei commented 3 years ago

I'm using the Companion Device Pairing method to connect to my BLE device. This allows the app not to ask for the location permissions. I noticed that this lib requests for ACCESS_COARSE_LOCATION in its manifest. However, I can't find any call to ActivityCompat.requestPermissions() in the plugin code nor in the Nordic DFU library.

Is this really required ? I guessed that since we need to provide the device address, a location request shouldn't be necessary.

fengqiangboy commented 3 years ago

See developer guide here

xurei commented 3 years ago

There is no mention of ACCESS_COARSE_LOCATION on this page at all.

However, they say this : Because discoverable devices might reveal information about the user's location, the device discovery process requires location access. If your app is being used on a device that runs Android 8.0 (API level 26) or higher, use the Companion Device Manager API. This API performs device discovery on your app's behalf, so your app doesn't need to request location permissions.

Are you sure this question is irrelevant ?