Skip to content

Most visited

Recently visited

navigation

Optimizing for Battery Life

Battery life is the single most important aspect of the mobile user experience. A device without power offers no functionality at all. For this reason, it is critically important that apps be as respectful of battery life as possible.

There are three important things to keep in mind in keeping your app power-thrifty:

Lazy First

Making your app Lazy First means looking for ways to reduce and optimize operations that are particularly battery-intensive. The core questions underpinning Lazy First design are:

You should ask these questions when it comes to using the CPU, the radio, and the screen. Lazy First design is often a good way to tame these battery killers.

To help you achieve these and other efficiencies, the Android platform provides a number of features to help maximize battery life.

Platform Features

Broadly speaking, the Android platform provides two categories of help for you to optimize your app's battery use. First, it provides several APIs that you can implement in your app. You can learn more about these APIs in Intelligent Job Scheduling and Network Use and Battery Consumption.

There are also internal mechanisms in the platform to help conserve battery life. While they are not APIs that you implement programmatically, you should still be aware of them so that your app can leverage them successfully. For more information, see Doze and App Standby.

You can get even more benefit out of these features by using the tools available for the platform to discover the parts of your app that consume the most power. Finding what to target is a big step toward successful optimization.

Tooling

There are tools for Android, including Profile GPU Rendering and Battery Historian to help you identify areas that you can optimize for better battery life. Take advantage of these tools to target areas where you can apply the principles of Lazy First.

More resources

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.