Audio Headset Battery Monitor
Reports battery level (0–100) for the most recently active Bluetooth audio device, using the system broadcast Android fires when it learns a connected headset's battery (via HFP AT+IPHONEACCEV, AVRCP GetCapabilities, or vendor profiles).
The broadcast action and extra strings are hidden BluetoothDevice constants but have been stable for years — every music player on Android relies on them. They're protected broadcasts so only the system can send them.
Limitations:
Only fires for paired audio devices, not arbitrary BLE peripherals.
AirPods on Android typically don't report battery (Apple's protocol isn't parsed by the AOSP stack).
Requires the
BLUETOOTH_CONNECTruntime permission on API 31+.