O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monitoring the Battery

Typically, all versions of the Android OS have some sort of battery-level monitoring display so that the user knows when to recharge the device. However, just because the battery level is displayed to the user doesn’t mean that the user will pay attention and plug in the phone or tablet when needed. To avoid complications from the device shutting down during app execution, you may need to monitor the battery within the app so that the app can take necessary precautions if the level gets too low. You may also require the user to have the device plugged in to external power to carry out certain operations that might require a significant power drain.

Monitoring the battery is not crucial to the MyContactList app. However, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required