Guide
The Android BLE field guide
Every BLE article on this site, in the order you run into the problems: from the permission prompt to the last byte of a firmware update. Code is Kotlin and tested on real phones. iOS notes where they differ.
Short answer
How do you build a reliable BLE app on Android?
Get permissions and scanning right for each Android version, run every GATT operation through one queue, close every BluetoothGatt you're done with, handle disconnect statuses and bonding explicitly, tune MTU and connection parameters with the firmware team, make OTA updates resumable, and test on the phone brands your users actually have.
Part 1
Before the first connection
Permissions and scanning decide whether the app ever sees the device.
Android 12+ Bluetooth permissions: BLUETOOTH_SCAN, CONNECT and location, done right
On Android 12 (API 31) and later, a BLE app requests BLUETOOTH_SCAN to scan and BLUETOOTH_CONNECT to connect; with android:usesPermissionFlags="neverForLocation" on BLUETOOTH_SCAN…
Permissions & scanningBLE in the background on Android: scanning limits, Doze and foreground services
Android limits background BLE in several layers: more than five scan starts in 30 seconds are throttled, unfiltered scans stop while the screen is off, long scans are downgraded,…
Part 2
Connecting and staying connected
The failures that fill bug trackers: 133 on connect, drops later, and operations that collide.
GATT 133 on Android: why BLE connections fail and how to fix them
Status 133 is Android's generic GATT_ERROR (0x85): the connection failed and the Bluetooth stack doesn't say why. The most common causes are BluetoothGatt objects that were never…
ConnectionsAndroid BLE connection drops: what status 8, 19 and 22 mean and how to fix them
When an Android BLE connection drops, the status in onConnectionStateChange says who ended it: 8 means the link timed out (range, interference or a device reset), 19 means the…
ConnectionsWhy your Android BLE app needs a GATT operation queue (and how to write one in Kotlin)
Android's BluetoothGatt can run only one GATT operation at a time per connection: a read, write, descriptor write, MTU request or service discovery started before the previous…
Part 3
Pairing, data and speed
Bonds that break, and transfers that use a fraction of what the link can carry.
Android BLE bonding problems: pairing loops, stale bonds and how to recover
Most BLE bonding problems come from three things: the app doing GATT operations while bonding is still in progress, a device that pairs without storing keys so users are asked…
Throughput & OTABLE MTU and throughput: why your transfers are slow and what to change
BLE throughput depends on six settings working together: write type, link-layer packet size (Data Length Extension), ATT MTU, PHY, connection interval and how many packets the…
Part 4
Updates and setup
Firmware updates that finish, and getting a device onto Wi-Fi.
Why BLE firmware updates fail (OTA and DFU), and how to make them finish
BLE firmware updates usually fail for a handful of reasons: the connection drops mid-transfer and the update can't resume, the app writes slowly and users give up, the OS suspends…
Wi-Fi & IoTWi-Fi provisioning over BLE: getting IoT devices online without losing users
For most IoT devices, provisioning Wi-Fi over BLE is the smoother option: the phone stays on its own network, the device scans for Wi-Fi networks and sends the list over BLE, the…
Part 5
Both platforms
iOS background behavior, and sharing the BLE layer between Android and iOS.
CoreBluetooth state restoration: keeping an iOS BLE app connected in the background
To keep an iOS BLE app working in the background, enable the bluetooth-central background mode, create the CBCentralManager with a restore identifier, implement…
iOS & KMPKotlin Multiplatform for BLE apps: what to share and what to keep native
In a Kotlin Multiplatform BLE app, share the parts that must behave the same on Android and iOS: the device protocol (framing, parsing, checksums, OTA chunking), the connection…
Part 6
Testing and choosing
How to test on the phones your users have, and which link to pick for an IoT product.
How to test a BLE app on real phones: the device matrix, HCI logs and field logging
Test a BLE app on the phone brands and OS versions your users actually have, not only the team's phones; run the scenarios that break BLE apps (walking out of range, locking the…
Wi-Fi & IoTBLE vs Wi-Fi vs MQTT for an IoT app: which link to use, and when to combine them
Use BLE for setup and for control when the phone is near the device and battery life matters; Wi-Fi on the local network for fast, frequent control at home without the cloud; and…
Testing & hiringHow to hire a BLE app developer: 10 questions that separate specialists from generalists
To hire a BLE app developer, ask how they would debug a connection that fails only on some phones, what they do after status 133, how they queue GATT operations, handle bonding…
Reference
Keep these open while you debug
GATT status code lookup
Look up any Android BLE GATT or HCI status code (133, 8, 19, 22, 62, 0x3D): what it means on Android and what to check first.
ToolBLE throughput calculator
Estimate BLE throughput from MTU, Data Length Extension, PHY, connection interval and packets per event, and how long a firmware update takes.
ToolAndroid BLE permissions generator
Generate the AndroidManifest Bluetooth permissions and runtime request code for your minSdk and targetSdk, including neverForLocation.
GuideBLE glossary
35 Bluetooth Low Energy terms explained in one or two sentences for app developers: GATT, ATT MTU, CCCD, bonding, DLE, PHY, autoConnect, state restoration.
Rather have someone fix it?
The BLE reliability audit finds what's wrong with your app's BLE layer on real phones, in about a week, at a fixed price.
Free · NDA on request · reply within 1–2 working days