Hi Please use this function to pass phone number and country code like india 91
public static String parseContact(String contact, String countrycode) {
PhoneNumber phoneNumber = null;
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
String finalNumber = null;
String isoCode = phoneNumberUtil.getRegionCodeForCountryCode(Integer.parseInt(countrycode));
boolean isValid = false;
PhoneNumberType isMobile = null;
try {
phoneNumber = phoneNumberUtil.parse(contact, isoCode);
isValid = phoneNumberUtil.isValidNumber(phoneNumber);
isMobile = phoneNumberUtil.getNumberType(phoneNumber);
} catch (NumberParseException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
}
if (isValid
&& (PhoneNumberType.MOBILE == isMobile || PhoneNumberType.FIXED_LINE_OR_MOBILE == isMobile)) {
finalNumber = phoneNumberUtil.format(phoneNumber,
PhoneNumberFormat.E164).substring(1);
}
return finalNumber;
}