Android 14 may have support for a new feature that provides users with information on the health of their device's battery. New application programming interfaces (APIs) discovered in the newest Android 14 beta might reveal information such as the battery's health, the production date, when it was first used, how many charging cycles have been performed, and the charging policy. Because these are supplied via APIs, third-party apps may also access some of the information, anticipating the introduction of battery health monitoring tools in Android 14 later this year.
Mishaal Rahman of Esper discovered the new BatteryManager APIs in the current Android 14 beta. Two of these APIs, which track battery charge cycles and the charging state of the battery, are public, which implies that third-party programmes can use them. Details such as charging policy, health condition, and charging policy, on the other hand, can only be accessible by system apps.
I bought a used Pixel 7 Pro recently and thought it was a shame that Google's battery health feature hasn't been released.
— Mishaal Rahman (@MishaalRahman) June 1, 2023
It'd be nice to see how many charge cycles it's had or the estimated % of its original capacity. Fortunately, Google's made it possible in Android 14! 🧵 pic.twitter.com/KXGtLwhJtU
Battery health monitoring applications have been available on the Play Store for some years, with apps such as AccuBattery and BatteryGuru providing estimations of battery health without relying on APIs. Since iOS 11.3, iPhone users have had access to a battery health monitoring function incorporated into the Settings app.
According to Rahman, in order for a third-party software to obtain access to these system APIs, you must grant it the BATTERY_STATS Android permission. You may grant this permission using a command line interface and a USB cord.
Although Android 14 is still a few months away, developer Narek (Twitter: @narektor) has already released an open-source programme that can retrieve these information through the public and system APIs. If your Pixel smartphone is running Android 14 Beta 2, you can get the open-source Batt app from GitLab.
It is important to note that the app is only a proof-of-concept, and you should not depend on the information until Android 14 is launched later this year. Rahman also mentions that in Android 14, apps like Tasker would add support for automation based on battery statistics supplied by the OS. Similarly, if Google provides an in-built mechanism for providing battery health information, similar to iOS, it will reduce the need for third-party apps to provide comparable functionality.