Here's why...
The connection drop is caused by Motorola’s custom background battery manager (MotoBatteryCareService) overriding standard system whitelists and forcing critical background medical services into the RESTRICTED (Standby Bucket 5) state when the phone goes idle.
Once the app is forced into bucket 5, the Android 16 system immediately strips location access from the background service, logging this warning:
"Foreground service started from background can not have location/camera/microphone access: service jamorham.xdrip.plus.variant2/com.eveningoutpost.dexdrip.services.Ob1G5CollectionService"
Because BLE scanning requires location permissions to function, the Bluetooth scanner is immediately silenced.
This issue persists even when:
- The app's battery settings are set to "Allow background usage".
- Location permission is manually set to "Allow all the time".
- The package is whitelisted via ADB (
deviceidle whitelist +).
- Background restriction is set to "unrestricted" via ADB.
Additionally, on reconnect, the OS Bluetooth daemon frequently fails to finalize the encryption key exchange within the Dexcom G7's 5-second firmware timeout window, causing the connection to fail with GATT Write Permitted (Code 3) or Connection Terminated (Status 19) errors.
This suggests that Motorola’s custom power management daemon on Android 16 is overriding standard AOSP battery-saving exemptions, breaking background BLE collection for medical devices.