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
If the scan times out or otherwise fails for some reason, `onComplete` will be called with an error code as result, defined in `Flic2ScanCallback` or `Flic2ButtonListener`.
102
102
103
-
Before scanning however, we need to acquire the `Manifest.permission.ACCESS_FINE_LOCATION` permission by asking the user. This is due to a requirement of the Android platform in order to scan for Bluetooth Low Energy devices.
103
+
Before scanning however, we need to acquire some runtime permission by asking the user. This is due to a requirement of the Android platform in order to scan for/connect to Bluetooth Low Energy devices.
104
+
If targeting and running on Android 12 or higher `Manifest.permission.BLUETOOTH_SCAN` and `Manifest.permission.BLUETOOTH_CONNECT` are required. Otherwise `Manifest.permission.ACCESS_FINE_LOCATION` is required.
104
105
In your activity, use the following code:
105
106
106
107
```java
107
-
int permissionCheck =ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);
108
-
if (permissionCheck !=PackageManager.PERMISSION_GRANTED) {
0 commit comments