Android silently downgrades long-running BLE scans after 5 minutes: measurements, logcat and AOSP links
retained text
I’ve been fighting background BLE beacon scanning on Android and wrote up what I measured on a Samsung (Android 14, One UI 6.1). Short version: * A filtered `LOW_LATENCY` scan gets silently downgraded to `LOW_POWER` after `scan_timeout_millis`: 300 s on my device (AOSP default was 30 min, 10 min on Android 15+). Detections dropped from \~80/min to \~10/min. No callback, no error, just `Moving filtered scan client to downgraded scan` in logcat. * An empty `ScanFilter` is treated as no filter: with the screen off the scan is suspended and you get \~0 results. * The quota of 5 starts per 30 s: the 6th `startScan` was rejected, and `onScanFailed` was never called. * With a Foreground Service, turning the screen off didn’t kill the scan by itself. The timeout did. * Restarting the scan every 4 min through a single start counter, plus a silence watchdog, kept it at \~90/min with the screen on and \~48/min with the screen off. Full write-up with code and AOSP links (my article): [https://medium.com/@9hamden/your-android-ble-scan-quietly-dies-after-5-minutes-and-you-dont-even-know-it-5e603c493177](https://medium.com/@9hamden/your-android-ble-scan-quietly-dies-after-5-minutes-and-you-dont-even-know-it-5e603c493177) Curious what you see on your devices: what does `adb shell device_config get bluetooth scan_timeout_millis` return? Especially Pixel, Xiaomi and OnePlus.
document fetched 2026-11-16 00:18 · canonical https://reddit.com/r/androiddev/comments/1xwuxzy/android_silently_downgrades_longrunning_ble_scans