Skip to content

Commit

Permalink
added more comments to permissions declared in manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz committed Dec 13, 2022
1 parent c86e3f7 commit a46a61a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion blessed/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.welie.blessed">

<!-- Link: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions -->
<!-- Request legacy Bluetooth permissions on older devices. -->
<uses-permission
android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission
android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

<!-- Needed only if code looks for Bluetooth devices.
Since the code doesn't use Bluetooth scan results to derive physical
location information, it is strongly asserted that the code
doesn't derive physical location.
Link: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#assert-never-for-location
-->
<uses-permission
android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation"
tools:targetApi="s" />

<!-- Needed only if code communicates with already-paired Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

<!-- Needed only if code makes the device discoverable to Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />

<!-- Needed to target Android 11 and lower -->
<!-- Link: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android11-or-lower-->
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"
android:maxSdkVersion="30" />
Expand Down

0 comments on commit a46a61a

Please sign in to comment.