Android™ Permissions for Bluetooth® Low Energy (BLE)

Last modified by Microchip on 2023/11/09 08:53

To use Bluetooth® features in an Android™ application, the BLUETOOTH permission should be declared in the app manifest, AndroidManifest.xml, of the Android app project. This permission is needed for any Bluetooth communication, such as requesting or accepting a connection and transferring data.

<uses-permission android:name="android.permission.BLUETOOTH"/>

To initiate device discovery or manipulate Bluetooth settings, BLUETOOTH_ADMIN permission should also be declared in the app manifest. If the BLUETOOTH_ADMIN permission is declared, then the BLUETOOTH permission should also be declared.

<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

The next declaration is to ensure that the app is available to Bluetooth Low Energy (BLE) capable devices only.

<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

AndroidManifest.xml included with the MCHP Transparent UART Android app is an example of the app manifest. The Android permissions for BLE enabled in the AndroidManifest.xml are highlighted in the accompanying screenshot.

Android permissions for BLE enabled