Optimize your app battery using Android vitals wake lock metric
Article Summary
Google is cracking down on battery-draining apps. Starting March 2026, excessive wake lock usage could get your app demoted in the Play Store or flagged with battery warnings.
Google's new Android vitals metric targets partial wake locks that keep the CPU running when users aren't actively using your app. The threshold: more than 2 hours of wake lock usage in 24 hours, affecting over 5% of sessions.
Key Takeaways
- Apps exceeding thresholds face reduced Play Store visibility and user warnings
- WorkManager, sensor batching, and passive location APIs reduce wake lock needs
- Background Task Inspector reveals frequently failing workers exhausting system quotas
- Perfetto UI with SQL queries identifies which wake locks consume battery
- ProfilingManager (SDK 35+) enables programmatic trace collection for production issues
Proper wake lock implementation using alternative APIs and debugging tools like system traces is now essential for maintaining Play Store visibility and user trust.
About This Article
Developers have a hard time figuring out which wake locks are draining battery in production. Wake lock names need to follow strict rules, no PII allowed and no obfuscable class names. This makes it tough to group data together and debug issues across millions of user sessions.
Android Developers suggest using hard-coded, non-unique wake lock tag names. Then use Perfetto UI's SQL analysis to add up wake lock durations by tag. This lets developers find which wake locks use the most battery across their users.
When developers use proper wake lock naming and SQL queries to total up duration data, they can spot and fix the wake locks causing the worst battery drain. This matters because Google Play enforces new requirements in March 2026.