O'Reilly logo

Professional Android™ 2 Application Development by Reto Meier

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 12. Telephony and SMS

WHAT'S IN THIS CHAPTER?

  • Initiating phone calls

  • Reading the phone, network, data connectivity, and SIM states

  • Monitoring changes to the phone, network, data connectivity, and SIM states

  • Using Intents to send SMS and MMS messages

  • Using the SMS Manager to send SMS Messages

  • Handling incoming SMS messages

In this chapter, you'll learn to use Android's telephony APIs to monitor mobile voice and data connections as well as incoming and outgoing calls, and to send and receive SMS (short messaging service) messages.

You'll take a look at the communication hardware by examining the telephony package for monitoring phone state and phone calls, as well as initiating calls and monitoring incoming call details.

Android also offers full access to SMS functionality, letting you send and receive SMS messages from within your applications. Using the Android APIs, you can create your own SMS client application to replace the native clients available as part of the software stack. Alternatively, you can incorporate the messaging functionality within your own applications to create social applications using SMS as the transport layer.

At the end of this chapter, you'll use the SMS Manager in a detailed project that involves creating an emergency SMS responder. In emergency situations, the responder will let users quickly, or automatically, respond to people asking after their safety.

TELEPHONY

The Android telephony APIs let your applications access the underlying telephone hardware ...

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