Android Phone Number Check isPhoneNumber(String inputStr)

Here you can find the source of isPhoneNumber(String inputStr)

Description

is Phone Number

Declaration

public static boolean isPhoneNumber(String inputStr) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean isPhoneNumber(String inputStr) {
        if (inputStr == null) {
            return false;
        }//from   w ww .  ja  v a 2s.  com
        if (inputStr.startsWith("1") && inputStr.length() == 11) {
            return true;
        }
        return false;
    }
}

Related

  1. isPhone(String phoneNumber)
  2. isPhoneNumber(final String phone)
  3. isTelNumAvailable(String telNum)
  4. isMobile(String mobiles)