The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
If you can measure power drain well yourself, that is the best way for you to determine precisely where your power consumption is going. Alas, for various reasons, you may not be able to get good power consumption data.
Which means you may have to guess.
We know the general sorts of things that consume power in a device, such as the screen and the CPU. We know that if we use these things less, we will use less power. Eventually, though, we have an app that does nothing, and while this may result in optimal power usage, we are still likely to get poor reviews, because the app does nothing.
What we need is some rough idea of how bad certain things are, so we can weigh our use of those system components appropriately.
This chapter will try to give you some “rule of thumb” heuristics of how to estimate power usage of various system components, plus some general recommendations of how to use less of that particular component without necessarily eliminating useful functionality from your app.
Understanding this chapter requires that you have read the core chapters and understand how Android apps are set up and operate.
Also note that:
The preview of this section was lost due to a rupture in the space-time continuum.
The preview of this section is sleeping in.
The preview of this section was abducted by space aliens.
The preview of this section is [REDACTED].
The preview of this section is unavailable right now, but if you leave your name and number at the sound of the tone, it might get back to you (BEEEEEEEEEEEEP!).
The preview of this section apparently resembled a Pokémon.