Selasa, 05 April 2011

How to send SMS using android.telephony.SmsManager

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);


0 komentar:

Posting Komentar

Copyright © 2012 Codding News All Right Reserved