If you want to send the SMS programmatically then follow the following steps. Take a button on activity_main.xml file as follows. According to above code when user clicks the button sendmySMS method will be called. sendmySMS is user defined method. In the AndroidManifest.xml file, add the following statements Now we write the final step. Write the given below method in MainActivity,java file In this example we have used two emulator. On the first Android emulator (5544), click the Send SMSbutton to send an SMS message to the second emulator(5546).
Can you answer this question?
Write Answer1 Answers