Explain sending sms messages programmatically?



Explain sending sms messages programmatically?..

Answer / Shashi Sagar

Sending SMS messages programmatically in Android can be done using the SmsManager class. Here's a simple example:
1. Add the `READ_SMS` and `SEND_SMS` permissions to your manifest file.
2. Create an instance of SmsManager, typically within the Activity's `onCreate()` method.
3. Prepare the SMS message using the `buildTextMessage()` method of SmsManager.
4. Send the prepared message using the `sendTextMessage()` method.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Android OS Interview Questions

How does android track the application on process?

1 Answers  


Sencha touch is?

1 Answers  


How do I install android on my phone?

1 Answers  


What is an android framework?

1 Answers  


What is settings.gradle?

1 Answers  


How would you update the ui of an activity from a background service?

1 Answers  


What is src file in android?

1 Answers  


Explain the difference between service & intent service?

1 Answers  


What is pojo class in android?

1 Answers  


How to build a url from uri?

1 Answers  


What is service in android?

1 Answers  


How do I update my os on my android?

1 Answers  


Categories