Skip to content

Instantly share code, notes, and snippets.

@mreis1
Created July 13, 2023 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mreis1/93704b280dc1a68c8423310a8858de7c to your computer and use it in GitHub Desktop.
Save mreis1/93704b280dc1a68c8423310a8858de7c to your computer and use it in GitHub Desktop.
Android 12 Settings for bluetooth devices
<!-- took from: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions -->
<?xml version='1.0' encoding='utf-8'?>
<manifest ....your_attributes>
<!-- ... your settings and <application tag...>-->
<!-- 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" />
<!-- Needed only if your app looks for Bluetooth devices.
If your app doesn't use Bluetooth scan results to derive physical
location information, you can strongly assert that your app
doesn't derive physical location. -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<!-- Needed only if your app makes the device discoverable to Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<!-- Needed only if your app communicates with already-paired Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- Needed only if your app uses Bluetooth scan results to derive physical location. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
...
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment