Skip to content

Commit 4c888d7

Browse files
committed
Permission requirements fixed, comments updated
1 parent 6fe2a7c commit 4c888d7

File tree

5 files changed

+128
-87
lines changed

5 files changed

+128
-87
lines changed

scanner/src/main/AndroidManifest.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@
44

55
<!--
66
Bluetooth permissions require to check Bluetooth Adapter state
7-
and starting LE scan.
8-
9-
Note: For scanning purpose, the permissions below have been replaced with
10-
BLUETOOTH_SCAN in Android API 31 (Android 12).
11-
Due to possible use of flag, apps need to request the permission on their own.
7+
and starting LE scan before Android S (API 31).
128
-->
139
<uses-permission
1410
android:name="android.permission.BLUETOOTH"
1511
android:maxSdkVersion="30"/>
1612
<uses-permission
1713
android:name="android.permission.BLUETOOTH_ADMIN"
1814
android:maxSdkVersion="30"/>
15+
<!--
16+
Bluetooth Scan permission is required from Android S onwards.
17+
18+
Note: This permission may be used with "usesPermissionFlag". If you don't need location,
19+
declare this permission with this flag set to "neverForLocation".
20+
-->
21+
<uses-permission
22+
android:name="android.permission.BLUETOOTH_SCAN" />
1923

2024
<!--
2125
Location permission has been removed from here, as it may not be required for
22-
Android 12 onwards. Instead, apps should request BLUETOOTH_SCAN permission with or without
23-
"neverForLocation" flag, and the location permission only if necessary.
26+
Android 12 onwards. It is required on Android 6-11 when scanning for Bluetooth LE devices.
2427
28+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
2529
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
2630
-->
2731

0 commit comments

Comments
 (0)