You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__Since plugin version 1.2.0 the `startScanning` function will handle this internally so it's no longer mandatory to add permission checks to your code.__
69
72
70
73
On Android 6 you need to request permission to be able to interact with a Bluetooth peripheral (when the app is in the background) when targeting API level 23+. Even if the `uses-permission` tag for `ACCESS_COARSE_LOCATION` is present in `AndroidManifest.xml`.
71
74
72
75
Note that for `BLUETOOTH` and `BLUETOOTH_ADMIN` you don't require runtime permission; adding those to `AndroidManifest.xml` suffices (which the plugin does for you).
73
76
74
-
Note that `hasCoarseLocationPermission` will return true when:
77
+
Note that `hasLocationPermission` will return true when:
75
78
* You're running this on iOS, or
76
79
* You're targeting an API level lower than 23, or
77
80
* You're using a device running Android < 6, or
78
81
* You've already granted permission.
79
82
80
83
```typescript
81
-
bluetooth.hasCoarseLocationPermission().then(
84
+
bluetooth.hasLocationPermission().then(
82
85
function(granted) {
83
86
// if this is 'false' you probably want to call 'requestLocationPermission' now
0 commit comments