Location needs to be enabled for Bluetooth Low Energy Scanning on Android 6.0

前端 未结 8 697
旧巷少年郎
旧巷少年郎 2020-11-27 13:05

After upgrading to Android version 6.0 Bluetooth Low Energy (BLE) scanning will only work if Location services are enabled on the device. See here for reference: Bluetooth L

8条回答
  •  野性不改
    2020-11-27 13:42

    From what I recently noticed on android 8.0, it is not required to turn on your GPS to do a BLE Scan, but you have to declare it in the manifest, but the user must allow the permission.

    Android will prompt the user to allow location permission when you attempt to do a scan with startScan() method. Your scan will fail if the permission is not allowed.

提交回复
热议问题