Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications
by James Talbot, Justin McLean, Jorge Hernandez
Summary
You can set up your Android application to run as a service, providing a consistent and reliable experience for the end user. You also can do this for location sensing services if you want your app to track where the user is, even if the app is not open.
You can compare your app’s consumption of power to that of other apps running on a device. You also can obtain the current power level of the device and react by turning off certain power-consuming activities, such as the GPS. You use the AlarmManager class so you don’t drain the battery by checking power levels too frequently; checking the level every 30 minutes provides a good balance of functionality and power consumption.
Database access can take a lot of time and can slow down an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access