With so much being made of the computing power of Android devices it is easy to almost forget that they can also function as telephones. It's ironic that we do not cover this subject until the end of this book. As we deal with telephony at this point, we will also explore other network functionality.
This chapter introduces several new packages and classes, particularly the TelephonyManager in the android.telephony package. We will use these along with the system's built-in Phone Application to take control over the making of phone calls from within an application. We will also use the PhoneStateListener class to monitor the device's mobile radio.
The android.telephony
package also provides a SmsManager class and this can be utilized to send text messages from our applications. The monitoring of outbound and inbound SMS messages is covered along with how to use PendingIntent and BroadcastReceiver objects to cause and detect these events.