List of usage examples for android.telephony PhoneNumberUtils isGlobalPhoneNumber
public static boolean isGlobalPhoneNumber(String phoneNumber)
From source file:com.yangtsaosoftware.pebblemessenger.services.PebbleCenter.java
public void doSendSMSTo(String phoneNumber, String message) { if (PhoneNumberUtils.isGlobalPhoneNumber(phoneNumber)) { SmsManager smsmanager = SmsManager.getDefault(); ArrayList<String> smsList = smsmanager.divideMessage(message); for (String sms : smsList) { smsmanager.sendTextMessage(phoneNumber, null, sms, null, null); }/*from www.j a v a 2 s. c o m*/ Constants.log("sendsms", String.format("send:[%s] to number:%s", message, phoneNumber)); } }