Using the Phone

An Android device not only provides hardware devices that can be used in an app to collect information on the device’s internal and external environment, but also includes hardware capabilities that can be accessed to provide certain functionality for an app. To access data from a sensor, the app listens for a broadcast from a sensor. However, other hardware on an Android device operates only when the user or an app wants to use it. In these cases, accessing the functionality provided by the hardware is accessed by calling the API associated with the hardware. One such piece of hardware provided by some devices is a telephone. In the MyContactList app, you will code the ContactActivity so that pressing and holding one of the ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.