Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Location permission are required for Ble scan in android Marshmallow onwards

With the latest release of Android called Marshmallow,Starting a Bluetooth Low Energy scan requires permission from Location group. As a result of that one of the following permissions are required:

ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION

Any reason why we need to switch on GPS for BLE scan?

like image 848
Gaurav Kakkar Avatar asked Jan 18 '17 10:01

Gaurav Kakkar


1 Answers

BLE beacons can be used to get location information using nothing more than the BLE broadcast UUID data and an internet connection (e.g. iBeacon, AltBeacon etc.) Since this is possible and the data can be acquired via scan, a permission for location is required. In reality, ACCESS_COARSE_LOCATION is the required level in order to get NetworkProvider level of permission. By using, ACCESS_FINE_LOCATION you get NetworkProvider as well as GPS.

like image 173
Larry Schiefer Avatar answered Sep 28 '22 19:09

Larry Schiefer