Aim:
Write a program to send and receive text messages using SMSManager API
Description
In this practical we are going to use the SMSManager api
Process
Create project and we get the activity_main.java and MainActivity.java. So to right click on the package folder (folder in which MainActivity.java exist) created a broadcast receiver activity
Code
- AndroidManifest.xml: For permission & action for SMS into the receiver tag
- MainActivity.java: To display the activity of and activity_main.xml file
- activity_main.xml: Design page of the MainActivity.java
- MyReceiverApp.java: To define the action on messaging activity
AndroidManifest.xml
MainActivity.java
activity_main.xml
MyReceiverApp.java
Output:
- Output on mobile phone

