O'Reilly logo

Android Application Development by G. Blake Meike, Zigurd Mednieks, John Lombardo, Rick Rogers

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

Chapter 15. Telephony State Information and Android Telephony Classes

The previous chapter showed how to use Android’s built-in PhoneApp application, which simplifies the task of placing of phone calls. This chapter shows you how to get more information about telephone service and the actual calls you make.

After an example that puts one of the telephony features to use, we’ll present a short guide to PhoneApp internals.

Note

We use the term “telephony” to refer to the parts of the Android system that depend on a radio communicating with the public land mobile network (PLMN) to provide communication and location functions. Sharing the use of this radio among multiple applications is a key goal for Android’s telephony modules.

Operations Offered by the android.telephony Package

The android.telephony package contains a set of classes that can be used by any application in the Android environment to monitor the state of Android’s mobile network connection. It also contains classes for locating a device using the mobile network. Finally, it offers utility classes for parsing, formatting, and otherwise managing phone numbers, although there is no architectural benefit to locating those classes in this package.

The telephony package does not allow you to place, end, or otherwise meddle in phone calls; it focuses on retrieving information and giving users an interface to edit telephone numbers. We’ll explain later why Android reserves the actual control over phone calls to PhoneApp.

Package Summary ...

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