Why placement permission is required to scan Ble in android Marshmallow onwards

With the latest version of Android called Marshmallow , permission from a group of locations is required to run a Bluetooth Low Energy scan . As a result, one of the following permissions is required:

ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION

Any reason we need to enable GPSfor BLEscanning?

+4
source share
2 answers

- BLE , , UUID - (, iBeacon, AltBeacon ..). , , . ACCESS_COARSE_LOCATION - , NetworkProvider. ACCESS_FINE_LOCATION, NetworkProvider, GPS.

+6

Bluetooth , .

<uses-permission android:name="android.permission.BLUETOOTH" />  
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

 <uses-permission
 android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 <uses-feature android:name="android.hardware.location.gps" />

.

+2

Source: https://habr.com/ru/post/1667114/


All Articles