blob: 61f7176c3f21c722201f908b3032507f1b1e64df [file] [log] [blame]
Scott Main7736f962011-12-15 15:40:25 -08001page.title=Optimizing Battery Life
Scott Main604e4ed2011-12-13 18:24:34 -08002
3trainingnavtop=true
4startpage=true
5next.title=Monitoring the Battery Level and Charging State
6next.link=battery-monitoring.html
7
8@jd:body
9
10<div id="tb-wrapper">
11<div id="tb">
12
13<h2>Dependencies and prerequisites</h2>
14<ul>
15 <li>Android 2.0 (API level 5) or higher</li>
16 <li>Experience with <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a></li>
17</ul>
18
19<h2>You should also read</h2>
20<ul>
21 <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a>
22</ul>
23
24</div>
25</div>
26
27<p>For your app to be a good citizen, it should seek to limit its impact on the battery life of its
28host device. After this class you will be able to build apps that monitor modify their functionality
29and behavior based on the state of the host device.</p>
30
31<p>By taking steps such as disabling background service updates when you lose connectivity, or
32reducing the rate of such updates when the battery level is low, you can ensure that the impact of
33your app on battery life is minimized, without compromising the user experience.</p>
34
35<h2>Lessons</h2>
36
37<!-- Create a list of the lessons in this class along with a short description of each lesson.
38These should be short and to the point. It should be clear from reading the summary whether someone
39will want to jump to a lesson or not.-->
40
41<dl>
42 <dt><b><a href="battery-monitoring.html">Monitoring the Battery Level and Charging State</a></b></dt>
43 <dd>Learn how to alter your app's update rate by determining, and monitoring, the current battery
44level and changes in charging state.</dd>
45
46 <dt><b><a href="docking-monitoring.html">Determining and Monitoring the Docking State and
47Type</a></b></dt>
48 <dd>Optimal refresh rates can vary based on how the host device is being used. Learn how to
49determine, and monitor, the docking state and type of dock being used to affect your app's
50behavior.</dd>
51
52 <dt><b><a href="connectivity-monitoring.html">Determining and Monitoring the Connectivity
53Status</a></b></dt>
54 <dd>Without Internet connectivity you can't update your app from an online source. Learn how to
55check the connectivity status to alter your background update rate. You'll also learn to check for
56Wi-Fi or mobile connectivity before beginning high-bandwidth operations.</dd>
57
58 <dt><b><a href="manifest-receivers.html">Manipulating Broadcast Receivers On Demand</a></b></dt>
59 <dd>Broadcast receivers that you've declared in the manifest can be toggled at runtime to disable
60those that aren't necessary due to the current device state. Learn to improve
61efficiency by toggling and cascading state change receivers and delay actions until the device is in
62a specific state.</dd>
63</dl>