AltBeacon / android-beacon-library

Allows Android apps to interact with BLE beacons
Apache License 2.0
2.84k stars 836 forks source link

Add check for Android 12's BLUETOOTH_SCAN permission to CycledLeScanner #1065

Closed mannodermaus closed 2 years ago

mannodermaus commented 2 years ago

In addition to the existing permission checks for ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION, the CycledLeScanner is allowed to start its scan when running on an Android 12 device that has been granted the new permission, BLUETOOTH_SCAN.

Resolves https://github.com/AltBeacon/android-beacon-library/issues/1063. The impact of this change can be verified from my forked version:

repositories {
  jitpack()
}

dependencies {
  // implementation("org.altbeacon:android-beacon-library:2.19.2")
  implementation("com.github.mannodermaus:android-beacon-library:34b25a5e7a")
}
davidgyoung commented 2 years ago

Thank you, @mannodermaus. Yes, this is certainly needed.