You may have probably thought about this before–a battery level indicator for Bluetooth devices–but we don’t know why nobody has really made the effort to add such feature. That is, until now that some developers have begun working on Bluetooth battery level indicators on Android. Now on Android Open Source Project (AOSP), this feature will soon be available on Bluetooth devices from different brands such as Google, Sony, and Motorola or those running near-stock Android.
There is no need to download or use another app to check the battery level of Bluetooth devices because right on the smartphone, the information will be shown. A new API can be used by devs in AOSP so Bluetooth battery indicators will be included.
Most custom ROMs from before already have this. If your device runs LineageOS as a custom, you may have already seen this feature. Phones from other Android OEMs like LG, Samsung, Xiaomi, OnePlus, or Huawei have already added battery level indicators for Bluetooth connected devices and accessories. It’s only now that the feature is supported in AOSP.
Google is working on the new APIs that will hopefully “get remote device’s battery level”, as well as, add different APIs and functions as listed below:
• Add BluetoothDevice.getBatteryLevel() API to retreive battery level information of remote device
• Add BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent to notify user that remote device’s battery level has changed
• Add backend service methods for BluetoothDevice.getBatteryLevel()
• Add battery level field in DeviceProperties with getters and setters
• Add updateBatteryLevel() method in RemoteDevices
• Add resetBatteryLevel() method in RemoteDevices
• Reset battery level for device when device is disconnected in aclStateChangeCallback() to ensure a BATTERY_LEVEL_CHANGED intent when device first report battery level information after connection
• Add tests for updateBatteryLevel() and resetBatteryLevel()
We’re hoping to see this new feature on the upcoming Android 8.0 aka Android O.
VIA: XDA Developers
I guess it’s time to make it a native feature, Xiaomi’s MIUI has this feature for quite some time. 🙂