Google aims to improve the performance of Android apps across all devices. It has taken a step to solve one of the common issues many users face: excessive battery drain by background apps. The company has introduced a new metric called “excessive wake locks” for developers, allowing them to spot problems that cause background battery drain.
Google adds new wake lock metric to Android Vitals
In its Android developer blog post, Google said that Android developers will now be able to monitor “excessive wake locks” through the Android Vitals dashboard in the Play Console. It is worth noting that this metric is currently in the beta phase, so at the moment, developers participating in the beta test can get early access to it.
Wake locks let developers keep the device awake when the app is running in the background. While this is useful for some circumstances, such as when a user is playing music or tracking location, incorrect configuration may sometimes hurt battery life. To solve this, the new metric flags partial wake lock usage as excessive if the total duration surpasses 3 hours within a 24-hour period. Previously, developers could only track wake lock time when the app is in the background and not using a foreground service.
This metric directly addresses the issue of excessive battery drain for Android apps. Since developers can now optimize apps’ wake lock behavior, Google said it will significantly enhance battery life and user satisfaction. The company has teamed up with top OEMs like Samsung to use their real-world insights into excessive resource consumption.
“Samsung is excited to collaborate with Android and Google Play on these new performance metrics. By sharing our user experience insights, we aim to help developers build truly optimized apps that deliver exceptional performance and battery life across the ecosystem. We believe this collaboration will lead to a more consistent and positive experience for all Android users,” said Samsung.