Phone number contact format in Android
In Android I can get phone numbers of all the contacts without any problem.
The problem is that for most users some numbers are stored as 'local' numbers, meaning that they dont have the country code included.
For example, if the user lives in US and he has 2 contacts:
John - 555-123-1234 (local) (starting 1 not showing)
Jane - 44-123456787 (england phone number)
The question is: How do I get all the numbers in an international format, when some of the numb开发者_开发知识库ers doesnt include the country code? Any way to figure that out?
Check out android.telephony.PhoneNumberUtils
and see if one of its static methods does what you need.
I think the only way to do this is to have a table with all country codes and figure out what country the phone number is.
精彩评论