Im building an application that reads an incoming phonenumber, so far no problem. But i want my app to be able to determine the country code for the incoming number if the number is international.
Is there a simple solution for this?
Im uncertain if the country code always will be a fixed set of numbers, say +001 for US or only +1. If i knew that it will always be say three digist it would be very simple.
Iv taken a look at the PhoneNumberUtils class, but so far i haven't struck gold :(
Any ideas?
Regards,
Fredrik
The country code is one to three digits. There's a list at
http://en.wikipedia.org/wiki/List_of_country_calling_codes
The libphonenumber tools have exactly what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.