Android tutorial - Android Messages | How to send SMS message in Android - android app development - android studio - android development tutorial
Learn android - android tutorial - How to send sms message in android - android examples - android programs
What is SMS?
- SMS stands for short message service and which is also called text messaging or texting.
- SMS messages or ‘texts’ are usually sent from one mobile phone to another mobile, but can also be sent from some home phones.
- It is a quick and convenient way of sending a short message to someone.
- It would be safe to say that almost every mobile phone sold in the past decade has SMS messaging capabilities.
- In reality, SMS messaging is one excessive application for the mobile phone and it has created a stable income stream for mobile operators.
- Understanding how to use SMS messaging in your application can offer you with many ideas to create the next application.
- In Android, you can use SmsManager API or device’s Built-in SMS application to send a SMS message.
- In this tutorial, we show you two basic examples to send SMS message.
1. SmsManager API
2. Built-in SMS application
- Of course, both need SEND_SMS permission.
- P.S This project is developed in Eclipse 3.7, and tested with Samsung Galaxy S2 (Android 2.3.3).
- The Built-in SMS application solution is the easiest way, because you let device handle everything for you.
1. SmsManager Example
File : res/layout/main.xml
File : SendSMSActivity.java - Activity to send SMS via SmsManager.
File : AndroidManifest.xml , need SEND_SMS permission.
See Demo - android emulator - android tutorial :
2. Built-in SMS application Example
- This example is using the device’s build-in SMS application to send out the SMS message.