发送短信

public class SmsSender {
	public static final void sendSMS(Context c, PendingIntent intent, String content, String phoneNum) {
		if (null == c || null == content || null == phoneNum) {
			return;
		}
		
		SmsManager sms = SmsManager.getDefault();
		if (content.length() > 70) {
			List<String> msgs = sms.divideMessage(content);
			for (String msg : msgs) {
				sms.sendTextMessage(phoneNum, null, msg, intent, null);
			}
		} else {
			sms.sendTextMessage(phoneNum, null, content, intent, null);
		}
	}
}

你可能感兴趣的:(c,String,null,Class,sms)