public boolean isValidPhone(CharSequence phone) { if (TextUtils.isEmpty(phone)) { return false; } else { return android.util.Patterns.PHONE.matcher(phone).matches(); } }