0% found this document useful (0 votes)
21 views11 pages

MobApp 15 - Sending SMS

The document outlines the methods available in the SmsManager API for sending SMS messages in Android. Key functions include sending single and multi-part text messages, sending data messages, and sending multimedia messages. It also describes how to divide messages into fragments to comply with SMS size limitations.

Uploaded by

arslanqadri958
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views11 pages

MobApp 15 - Sending SMS

The document outlines the methods available in the SmsManager API for sending SMS messages in Android. Key functions include sending single and multi-part text messages, sending data messages, and sending multimedia messages. It also describes how to divide messages into fragments to comply with SMS size limitations.

Uploaded by

arslanqadri958
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Mobile Application Development Arfan Shahzad

{ [email protected] }
Mobile Application Development
Sending SMS

• In Android, you can use SmsManager API or devices Built-in SMS


application to send SMS's.
Sending SMS cont…
Sending SMS cont…

• There are few other important functions available in SmsManager


class.

• These methods are described in subsequent slides:


Sending SMS cont…

• 1- ArrayList<String> divideMessage(String text)

• This method divides a message text into several fragments, none


bigger than the maximum SMS message size.

• 2- static SmsManager getDefault()

• This method is used to get the default instance of the SmsManager


Sending SMS cont…

• 3- void sendTextMessage(String destinationAddress, String


scAddress, String text, PendingIntent sentIntent, PendingIntent
deliveryIntent)

• Send a text based SMS.


Sending SMS cont…

• 4- void sendMultipartTextMessage(String destinationAddress, String


scAddress, ArrayList<String> parts, ArrayList<PendingIntent>
sentIntents, ArrayList<PendingIntent> deliveryIntents)

• Send a multi-part text based SMS.


Sending SMS cont…

• 5- void sendDataMessage(String destinationAddress, String


scAddress, short destinationPort, byte[] data, PendingIntent
sentIntent, PendingIntent deliveryIntent)

• This method is used to send a data based SMS to a specific


application port.
Sending SMS cont…

• 6- divideMessage(String text)

• Divide a message text into several fragments, none bigger than the
maximum SMS message size.

• 7- sendMultimediaMessage(Context context, Uri contentUri, String


locationUrl, Bundle configOverrides, PendingIntent sentIntent)

• Send an MMS message


Sending SMS cont…

• 8- setSmscAddress(String smsc)

• Sets the SMSC address on (U)SIM.

You might also like