Alex MitrovicBLE & IoT app developer, Android and iOS

Free tool

Android BLE permissions generator

Pick your minSdk, targetSdk and what the app does. Get the manifest entries and the runtime request, with the version limits that are easy to get wrong.

Short answer

Which permissions does an Android BLE app need?

On Android 12 and later a BLE app needs BLUETOOTH_SCAN to scan (with neverForLocation if it doesn't derive location) and BLUETOOTH_CONNECT to connect; on Android 11 and earlier it needs BLUETOOTH and BLUETOOTH_ADMIN plus ACCESS_FINE_LOCATION for scanning, and ACCESS_BACKGROUND_LOCATION to scan in the background.

Android 12+
BLUETOOTH_SCAN, BLUETOOTH_CONNECT
Android ≤ 11
BLUETOOTH, BLUETOOTH_ADMIN, location
No location?
neverForLocation on BLUETOOTH_SCAN
Background
Foreground service type connectedDevice

Tool

Android BLE permissions generator

AndroidManifest.xml

Runtime request (Kotlin)

    The rules come from the Android documentation for Bluetooth permissions and foreground service types. The full story, with the mistakes I see most, is in Android 12+ Bluetooth permissions.

    FAQ

    Questions teams ask

    All questions
    Do I still need location permission for BLE on Android 12?

    No, not if you declare BLUETOOTH_SCAN with android:usesPermissionFlags="neverForLocation" and don't use scan results to find the user's location. You still need ACCESS_FINE_LOCATION for Android 11 and earlier, so declare it with android:maxSdkVersion="30".

    What does neverForLocation do?

    It tells Android your app never derives physical location from Bluetooth scan results, so BLUETOOTH_SCAN doesn't need location permission. The trade-off: some beacon advertisements are filtered out of your scan results.

    Why does connectGatt throw a SecurityException?

    On Android 12 and later, connecting needs the BLUETOOTH_CONNECT runtime permission. If the user hasn't granted it, connectGatt and many BluetoothDevice calls throw a SecurityException.

    Device works, app doesn't?

    Tell me about your device and what's breaking. No pitch deck needed. I'll tell you what I'd look at first, even if it isn't hiring me.

    Book a free call

    Free · NDA on request · reply within 1–2 working days