-1

I have question with sending SMS in Android phone.

I want to make the function that sends SMS to the number that is written in text file on Internal Storage with the body that is written in text file on Internal storage.

But I don't know how to make this function.

Can you help me to know how I can make this function?

rekire
  • 47,260
  • 30
  • 167
  • 264
  • 1
    possible duplicate of [Sending and Receiving SMS/MMS in Android](http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-mms-in-android) – rekire Feb 05 '13 at 06:42

1 Answers1

0

Here is how

step 1.

Include the following permission in your AndroidManifest.xml file

opentag

uses-permission android:name="android.permission.SEND_SMS"

closetag

step 2.

import android.telephony.SmsManager;

step 3.

Use this code snippet in the method which u r going to get message and phonenumber from form

SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNumber, null, message, null, null);

and to get the values from internal storage refer this link

http://www.mysamplecode.com/2012/06/android-internal-external-storage.html

raghav bhat
  • 57
  • 1
  • 10