Example usage for android.telephony PhoneNumberUtils isGlobalPhoneNumber

List of usage examples for android.telephony PhoneNumberUtils isGlobalPhoneNumber

Introduction

In this page you can find the example usage for android.telephony PhoneNumberUtils isGlobalPhoneNumber.

Prototype

public static boolean isGlobalPhoneNumber(String phoneNumber) 

Source Link

Usage

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