android.telephony.SmsManager manages SMS operations such as sending data, text, and pdu SMS messages. Get this object by calling the static method SmsManager.getDefault(). It supports both GSM and CDMA; please don't mix up with deprecated android.telephony.gsm.SmsManager.
SmsManager MySmsManager = SmsManager.getDefault();
String PhoneNumber = "123....67"; //fil with the receiver's phone number
String SMSText = "Hello Android";
MySmsManager.sendTextMessage(PhoneNumber, null, SMSText, null, null);
Hi Eric, this SMS is not valid for sending the SMS having the message text greater than 160 characters. How can we send the sms with character more than 160 words?
ReplyDeleteThank you.
Hello,
DeleteAs I know it's limited by SMS standard, may be you can separate the text in two (or more) message.
If instead of a phone number, I use a short code (5 digit number) the message goes nowhere.
ReplyDelete