Using Bluetooth in Mobile Apps
BLE for IoT, beacons and accessories — what works on iOS and Android, and how to ship reliable Bluetooth flows in 2026.
Bluetooth Low Energy is everywhere — fitness wearables, smart-home devices, point-of-sale beacons, audio accessories. Both iOS and Android expose mature BLE stacks, but they're both unforgiving: forget a permission, mis-handle background lifecycle, or scan too aggressively, and you'll see flaky behaviour and angry App Store reviews. This guide covers the production-ready playbook.
Key Takeaways
- Use Core Bluetooth on iOS, BluetoothLeScanner / GATT on Android, or libraries like react-native-ble-plx for cross-platform.
- Android 12+ requires the new BLUETOOTH_SCAN/CONNECT/ADVERTISE permissions instead of legacy location.
- iOS background scanning works but is heavily throttled; advertise patterns must match exactly.
- BLE is pairing-friendly but battery-aware: scan in bursts and respect connection intervals.
Bluetooth Low Energy at a Glance
What It Is & How It Works
What it is. A short-range, low-power radio for IoT, audio and accessory communication. Apps interact via the Generic Attribute Profile (GATT) — services and characteristics on a peripheral.
How it works. Scan for advertisements (or use a UUID filter), connect to a peripheral, discover services + characteristics, then read/write/subscribe to characteristic value updates.
Units & signal. Service / characteristic UUIDs (16-/128-bit), MTU (bytes per write), connection interval (ms), TX power (dBm), RSSI (dBm).
What You Can Build With It
Wearables and health
Sync heart rate, steps and glucose from BLE peripherals.
Example: A fitness app reading from a Polar HR strap.
Smart-home devices
Onboard, configure, and control Bluetooth-first devices.
Example: A door lock app that pairs with a Bluetooth-only bolt.
Beacons
Detect nearby Eddystone / iBeacon broadcasters for context-aware experiences.
Example: A retail app showing aisle promotions when near a beacon.
Point-of-sale accessories
Talk to BLE card readers, scales and printers.
Example: A POS app pairing with a Square BLE reader.
Permissions & Setup
iOS prompts for Bluetooth on first use. Android 12+ uses the new "Nearby devices" runtime prompt for SCAN/CONNECT/ADVERTISE.
iOS · Info.plist
NSBluetoothAlwaysUsageDescription
Android · AndroidManifest.xml
android.permission.BLUETOOTH_SCANandroid.permission.BLUETOOTH_CONNECTandroid.permission.BLUETOOTH_ADVERTISE (peripheral mode)android.permission.ACCESS_FINE_LOCATION (Android 11 and below for scan)
Code Examples
Setup
- Expo: `npx expo install react-native-ble-plx` (requires a dev build)
- iOS: import CoreBluetooth and add NSBluetoothAlwaysUsageDescription
- Android: declare BLUETOOTH_SCAN/CONNECT and request at runtime
import { BleManager } from 'react-native-ble-plx';
const manager = new BleManager();
export async function findHeartRateMonitor() {
return new Promise<string | null>((resolve) => {
const sub = manager.startDeviceScan(['180D'], null, (err, device) => {
if (err || !device) return;
manager.stopDeviceScan();
sub?.remove?.();
device.connect()
.then(d => d.discoverAllServicesAndCharacteristics())
.then(d => d.monitorCharacteristicForService(
'180D',
'2A37',
(_, char) => {
const bpm = char?.value ? parseHeartRate(char.value) : null;
console.log('HR:', bpm);
}
));
resolve(device.id);
});
setTimeout(() => { manager.stopDeviceScan(); resolve(null); }, 10_000);
});
}
function parseHeartRate(base64: string): number {
const bytes = Buffer.from(base64, 'base64');
return bytes[1];
}Tip: With Newly, you describe the feature you want and the AI agent wires up the sensor, permissions, and UI for you. Try it free.
Best Practices
Scan with service UUIDs
Filtering by service UUID is faster, drains less battery, and bypasses some Android scan-throttling.
Stop scanning as soon as you find what you need
Background scanning is one of the fastest ways to drain a phone's battery.
Honour MTU negotiation
Default MTU is tiny (23 bytes); negotiate up to 247 for big payloads.
Use State Restoration on iOS
Lets your app reconnect to known peripherals when the OS launches you in the background.
Common Pitfalls
Forgetting Android 12+ permissions
"BLUETOOTH" alone no longer scans or connects on modern Android.
Mitigation: Add BLUETOOTH_SCAN/CONNECT and request at runtime.
Holding a connection forever
Leaving GATT connections open burns battery and competes with the OS.
Mitigation: Disconnect after each transaction unless you genuinely need streaming.
Crashing on background updates
iOS may resume your process for a BLE event; you must rebuild the manager from scratch.
Mitigation: Use State Restoration with a stable restore identifier.
When To Use It (And When Not To)
Good fit
- IoT device onboarding and control
- Wearable / health peripheral integration
- Beacon-based proximity experiences
- POS, ticketing and accessory communication
Look elsewhere if…
- High-bandwidth file transfers (use Wi-Fi P2P)
- Long-range communication (>30 m)
- Anonymous user identification (MAC randomisation)
- Always-on background scanning at high duty cycle
Frequently Asked Questions
Do I need BLUETOOTH and BLUETOOTH_ADMIN on Android 12+?
No — they're replaced by the runtime permissions BLUETOOTH_SCAN, BLUETOOTH_CONNECT and BLUETOOTH_ADVERTISE.
Can my app keep scanning while in the background on iOS?
Yes, with the bluetooth-central background mode, but scans are heavily throttled and require a service UUID filter.
How do I get more than 23-byte writes?
Negotiate a higher MTU after connecting (`requestMtu(247)` on Android, exchange happens automatically on iOS up to 185).
Which library should I use in React Native?
react-native-ble-plx is the most popular; it requires a dev/EAS build, not Expo Go.
Build with the Bluetooth on Newly
Ship a bluetooth-powered feature this week
Newly turns a description like “use the bluetooth to wearables and health” into a real React Native app — permissions, native modules and UI included. Full source code is yours, and you can publish to the App Store and Google Play directly from the dashboard.
Want a deeper dive on the underlying APIs? See Expo Sensors, Apple Core Motion and Android sensor framework.
