As far as I know BRAZIL COUNTRY CODE is +55
But this piece of code
mobilePhoneNumber = "+32495665962";
isoCode = "BR";
phoneNumber = phoneNumberUtil.parse(mobilePhoneNumber, isoCode);
isValid = phoneNumberUtil.isValidNumber(phoneNumber);
phoneNumberType = phoneNumberUtil.getNumberType(phoneNumber);
System.out.println ("phoneNumber ----- > " + phoneNumber);
System.out.println ("isValid --------- > " + isValid);
System.out.println ("phoneNumberType - > " + phoneNumberType);
gives me that number as valid !
phoneNumber ----- > Country Code: 32 National Number: 495665962
isValid --------- > true
phoneNumberType - > MOBILE
Read the Javadoc:
defaultRegion- region that we are expecting the number to be from. This is only used if the number being parsed is not written in international format. The country_code for the number in this case would be stored as that of the default region supplied. If the number is guaranteed to start with a '+' followed by the country calling code, then "ZZ" or null can be supplied.
Your input is in international form, so this parameter is not used.
Why would you expect the library to convert a phone number in Belgium to one in Brazil?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With