Practical 6 : Android SMSManager send and receive text messages using API. - IndianTechnoEra
Latest update Android YouTube

Practical 6 : Android SMSManager send and receive text messages using API.

Android SMSManager API

 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

Post a Comment

Feel free to ask your query...
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.