DESCRIBE THE SMSMANAGER CLASS IN ANDROID.

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 888  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    Describe the SmsManager class in android.

    SmsManager class is responsible for sending SMS from one emulator to another or device.

    You cannot directly instantiate this class; instead, you call the getDefault() static method to obtain an SmsManager object. You then send the SMS message using the sendTextMessage() method:

    SmsManager sms = SmsManager.getDefault();
    sms.sendTextMessage("5556", null, "Hello from MindStick", null, null);

    sendTextMessage() method takes five argument.

    • destinationAddress — Phone number of the recipient.
    • scAddress — Service center address; you can use null also.
    • text — Content of the SMS message that you want to send.
    • sentIntent — Pending intent to invoke when the message is sent.
    • deliveryIntent — Pending intent to invoke when the message has been delivered.

      Modified On May-29-2015 12:04:22 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!