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