This is an example of a phone number:
972527774444
Where 972 is Israel, 52 is the area code (mobile in this case) and 7774444is the actual number.
I tried using the PhoneNumberUtil to parse it, but it asks for a region code "IL" - in this example and I don't know which region code will be used...
That is where I got stuck.
If I knew that 972 is the prefix then i could use the following on it:
PhoneNumberUtil.getRegionCodeForCountryCode(prefix);
Can libPhonenumber library help me identify 972 as the region code?
On Thursday, 21 June 2012 18:33:20 UTC+3, Shaopeng wrote:
Hello Avi,
What do the international numbers you get look like?
Basically you just need to parse the number to a PhoneNumber object. After that, you can get country code and number from the object using its getters.
Cheers,
Shaopeng
2012/6/21 Avi Hayun
It might be a simple question, but I have an app which gets an international number.