Describe the SmsManager class in android.

Answer

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:

SmsManagersms = SmsManager.getDefault();

sms.sendTextMessage("5556", null, "Hello from careerRide", 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.

All Android Questions

Ask your interview questions on android

Write Your comment or Questions if you want the answers on android from android Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---