Fixing React Native Bluetooth Low Energy Scans That Silently Return Nothing on Android 12+
A BLE scan built with react-native-ble-plx or a similar library finds nearby devices reliably on Android 11 and below. On Android 12 and newer, the exact same code runs without throwing any error, the scan callback fires, and the device list that comes back is simply empty. The cause sits in a new runtime permission Android 12 introduced specifically for Bluetooth, and a flag on it most teams never knew they needed to decide about.
The Problem
A React Native app using a BLE library like react-native-ble-plx starts a scan for nearby Bluetooth Low Energy devices. On Android 11 and earlier, this reliably returns a stream of discovered devices. After the app is tested on an Android 12 or Android 13 device, the exact same scan call succeeds — no exception, no permission-denied error, no crash — but the discovery callback simply never fires, or fires with zero devices, as if nothing nearby is advertising at all. The same physical devices are visible to the native Bluetooth settings screen on the exact same phone, confirming the hardware and the surrounding devices are fine.
Why It Happens
Android 12 replaced the old location-based Bluetooth permission model with a dedicated BLUETOOTH_SCAN permission, and a missing declaration here fails differently than a missing location permission used to
Before Android 12, BLE scanning required ACCESS_FINE_LOCATION, because scan results could theoretically be used to infer a user's location from known beacon positions — an app with that permission denied would usually see an explicit permission error. Android 12 introduced BLUETOOTH_SCAN and BLUETOOTH_CONNECT as their own distinct runtime permissions, separate from location entirely. An app still only requesting the old location permission, or requesting Bluetooth permissions in a way that doesn't match the new model, can end up in a state where the scan technically runs but the system quietly withholds all the results instead of raising a clear, loud error.
The neverForLocation flag on BLUETOOTH_SCAN determines whether the app still needs location permission and location services enabled, and picking it wrong produces a scan that runs but returns nothing
Android 12 lets an app declare android:usesPermissionFlags="neverForLocation" on its BLUETOOTH_SCAN permission in the manifest, which is a promise that the app will never use scan results to derive physical location — in exchange, the app doesn't need ACCESS_FINE_LOCATION or location services turned on at all. An app that declares this flag but actually needs location-correlated features like proximity-based beacon ranging gets no error about the mismatch; results that would depend on location data are simply withheld. Just as commonly, an app that omits the flag — intending to rely on the older, broader behavior — still needs location services enabled on the device, and if they're off, scanning silently returns nothing despite Bluetooth itself being on and working.
A library's own Android manifest merges with the app's, so the effective permission declaration often isn't the one a developer thinks they wrote
A BLE library's own bundled manifest frequently already declares BLUETOOTH_SCAN and related permissions with its own default flag choice, which Android's manifest merger combines with whatever the app's own manifest declares. Depending on merge order and how explicit each side is, the final, effective permission set installed on the device can end up different from what a developer assumes just from reading their own app's manifest file — making it easy to miss that the actual declared flag doesn't match what the runtime permission request dialog is asking the user to grant.
The Fix
1. Decide explicitly whether the app needs location-derived scan results, and declare neverForLocation accordingly
<!-- If scan results are never used to infer location
(e.g. just connecting to a known device by name/UUID): -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<!-- If the app does rely on location-correlated scanning
(e.g. proximity beacons, indoor positioning),
omit the flag and keep ACCESS_FINE_LOCATION too: -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
This decision has to be made deliberately rather than copied from a tutorial or left at a library's default, since it directly determines whether the app also needs location permission and location services enabled at all for scan results to come through on Android 12+.
2. Request BLUETOOTH_SCAN and BLUETOOTH_CONNECT explicitly at runtime on Android 12+, separate from any location permission request
import { PermissionsAndroid, Platform } from "react-native";
async function requestBlePermissions() {
if (Platform.OS === "android" && Platform.Version >= 31) {
const results = await PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN,
PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT,
]);
return Object.values(results).every(
r => r === PermissionsAndroid.RESULTS.GRANTED
);
}
// Pre-Android 12 fallback: request ACCESS_FINE_LOCATION instead
return true;
}
Treating Bluetooth permissions as their own distinct runtime request on Android 12+, rather than assuming a previously-granted location permission still covers scanning, matches the actual permission model the OS now enforces — a stale assumption from the pre-Android-12 flow is exactly what produces a silent, errorless empty scan.
3. If relying on the old behavior (no neverForLocation flag), confirm location services are actually turned on at the OS level, not just that the permission was granted
Settings -> Location -> confirm the device-wide location
toggle is ON, not just that the app has location permission
granted -- BLE scanning without neverForLocation needs both
the permission AND the system location service enabled
A granted permission and an enabled system service are two separate conditions, and BLE scanning in this mode needs both. It's common during testing to grant the permission once, consider the job done, and not realize that toggling location services off system-wide (common on a test device to save battery) silently zeroes out every scan result from then on.
4. Inspect the final merged manifest to confirm the actual effective permission declaration, rather than trusting only the app's own manifest file
# From an Android Studio project, or via the Android build tools:
cd android && ./gradlew app:processDebugManifest
# Inspect the merged manifest output, typically under:
# app/build/intermediates/merged_manifest/debug/AndroidManifest.xml
grep -A1 "BLUETOOTH_SCAN" app/build/intermediates/merged_manifest/debug/AndroidManifest.xml
Since a BLE library's bundled manifest can silently override or conflict with the app's own declaration during the merge, checking the actual merged output is the only reliable way to confirm which usesPermissionFlags value is really being installed on the device — rather than assuming it matches whatever line was written in the app's source manifest.
Why This Works
Android 12's Bluetooth permission split exists precisely so that scanning and connecting no longer have to imply location access by default, but that only works correctly when an app explicitly tells the system which mode it needs via neverForLocation. Requesting the new permissions directly, rather than relying on a location permission that no longer covers Bluetooth at all, aligns the app with the model the OS actually enforces. Checking the merged manifest closes the remaining gap: a library's own permission declaration can silently change the effective flag from whatever the app's source file says, and that's invisible until the merged output is actually inspected.
Conclusion
A BLE scan that runs without error but returns zero devices on Android 12 and newer is almost never a Bluetooth hardware or library bug — it's the new permission model silently withholding results because of a missing or mismatched BLUETOOTH_SCAN declaration, an unmet location-service requirement, or a manifest merge that changed the effective permission flag without anyone noticing. Deciding deliberately on neverForLocation, requesting the Android 12+ Bluetooth permissions explicitly at runtime, confirming location services are on when relying on the older model, and inspecting the actual merged manifest turns a silent, confusing empty scan into a permission issue that's visible and fixable.
