Send SMS By Starting Your Activity

This example explains how you can send sms by starting your activity.


1.) Create a new project by File-> New -> Android Project name it SendSMSExample.

2.) Write following into main.xml:


3.) Add following permissions to your manifest file:



4.) Run for output.

1.) Create a project named SendSMSExample and set the information as stated in the image.

Build Target: Android 4.4
Application Name: SendSMSExample
Package Name: com.example.SendSMSExample
Activity Name: SendSMSExampleActivity


2.) Open file and write following code there:


3.) Compile and build the project.

NOTE: Check on device for actual output.