Over the years, one of the most annoying feature omissions in stock Android has been a battery indicator for connected Bluetooth devices. There is a public standard for reporting battery life from (supported) Bluetooth devices, but stock Android just doesn't use it. A few OEMs have implemented it themselves in the last few years, like Samsung and LG, but not Google.
To circumvent this problem, apps like BatOn offer hacky workarounds to report battery levels. But according to recent commits to the Android Open Source Project (AOSP) repository, new APIs to retrieve a remote device's battery level could be coming to Android. One new method being added to the BluetoothDevice class, called getBatteryLevel(), does exactly what it sounds like. It retrieves the battery level, from 0 to 100, of a connected device.
In addition, apps will be able to subscribe to the ACTION_BATTERY_LEVEL_CHANGED broadcast intent to be notified when the battery level on a given device changes. So for example, the Android Wear app could give you a notification when your smartwatch is close to dying, so you can recharge it. There are countless other uses for this API, but that's just one example.
Unfortunately, we may not see this API implemented in the final Android O release. When Google published Developer Preview 4 earlier this month, the company said that the APIs were finalized. This means that these new features will likely arrive in a later update, like 8.0.1 or 8.1.
- XDA Developers