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