Working with SMS
SMS stands for Short Message Service, but it's commonly called text messaging. The Android SDK supports sending and receiving text messages. We'll start by discussing various ways to send SMS messages with the SDK.
Sending SMS Messages
To send a text message from your application, you need to add the android.permission.SEND_SMS
permission to your manifest file and then use the android.telephony.SmsManager
class. See Listing 23–1 for the layout XML file and the Java code for this example. If you need to see where the permission goes in the manifest XML file, you can sneak ahead to Listing 23–2.
NOTE: We will give you a URL at the end of the chapter that you can use to download projects of this chapter. This will allow you to ...
Get Pro Android 4 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.