Android 14 like iOS: function to know the health of the upcoming battery

0
4
android 14 like ios: function to know the health of
android 14 like ios: function to know the health of

 

On Android 14 could finally debut a function to know the battery health of the smartphone. Mishaal Rahman has indeed singled out new BatteryManager APIs in the beta version of the new operating system, an unequivocal sign that something could soon change. On the iPhone, a similar function has been present since the release of iOS 11.3 (March 2018) and is particularly appreciated as it provides valuable information on the actual battery conditions.

The very first signs of this feature date back to the QPR betas of Android 13. The APIs introduced in the Android 14 beta provide information for example on dates of manufacture and first usehealth status and number of charging cycles carried out. Apps can have access to APIs through BATTERY_STATS permission granted through ADB. For now, the function is only accessible from Pixel devices with Android 14 beta 2 and later versions installed (the latest is beta 2.1 released at the end of May).

There are two publicly available APIs, the rest are system APIs. The “battery health” feature was removed from the SettingsIntelligence app in Android 14 beta 1.

Taking advantage of these new APIs, the developer Narek wanted to experiment with the function and created it Batt, (unofficial) application that indicates battery status and charging cycles. We repeat that this is not an original Google solution but the first case of an app that makes use of the new APIs to access information on the health of the smartphone battery. The app is available HERE, but we remind you that the results it provides are not always completely reliable as they depend on the capabilities of the charging IC (integrated circuit) and the Hardware Abstraction Layer (HAL). Once installed, run the command

pm grant com.porg.batt android.permission.BATTERY_STATS