Android examples for android.telephony:SmsManager
send SMS via SmsManager
import java.util.List; import android.content.Context; import android.telephony.SmsManager; public class Main { public static void sendSMS(Context context, String cellphone, String content) { SmsManager smsManager = SmsManager.getDefault(); List<String> texts = smsManager.divideMessage(content); for (int i = 0; i < texts.size(); i++) { String text = texts.get(i); smsManager.sendTextMessage(cellphone, null, text, null, null); }//from w ww .ja v a2 s . c o m } }