tags:

views:

73

answers:

2
+2  Q: 

Get Country code

Hi! I can get Country code ISO using TelephonyManager function getNetworkCountryIso(), this functions returns country code US for USA, but how can i get numeric country code? I am unable to find any function for it that give me country code in number for example function that will return 92 for Pakistan.

+1  A: 

Since they're a short list, with a clear mapping to the alpha codes, could you perhaps just store a mapping?

I'm not sure this is what you want though, since the ISO numeric country code for Pakistan is 586 and your question quotes "92", which is the international dialing code for Pakistan. The same principle would work though.

Jon Hanna
Sory for confusion, actually I want international dialing code. Is there any method in android to get?
ARDaniyal
Sorry, ISO codes and dialing codes is the bit I know about in your question. However you could try building a listing from http://en.wikipedia.org/wiki/List_of_country_calling_codes whatever your language or platform.
Jon Hanna
A: 

Here is a list of country codes for telephones:

http://en.wikipedia.org/wiki/List_of_country_calling_codes

Tom Gullen