I can get the country code in ISO form with TelephonyManager::getNetworkCountryIso(), as it returns the USA to the USA, etc., but how can I get the countryโs numerical phone code?
TelephonyManager::getNetworkCountryIso()
I cannot find any functions providing me with the data I am looking for since I need a function that (for example) returns 01for the USA / Canada, 92for Pakistan and so on.
01
92
Since they are a short list with a clear alpha-code mapping, maybe you just saved the mapping?
, , , ISO 586, "92", . , .
JSON ISO2 http://country.io/phone.json. PHP, :
$codes = json_decode(file_get_contents("http://country.io/phone.json"), true); echo $codes['US']; // => 1 echo $codes['PK']; // => 92
. http://country.io/data/.
Source: https://habr.com/ru/post/1758731/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1758726/how-do-i-configure-google-analytics-to-seperate-devtest-and-production-sites&usg=ALkJrhiu9uKG34JnEt2KRIUZMP89ErGgoAMultiple Description Attribute in C # - c # -4.0No close support in PHP 5.3.2-1ubuntu4.2 - phpInstalling Ruby-Gnome2 on Ubuntu with RVM - ruby โโ| fooobar.comJList throws ArrayIndexOutOfBoundsExceptions randomly - javaIs there such a structure as Twisted Matrix for C #? - c #How to integrate the YouTube API into the iPhone app? - apiHow to convert complex applescript to a single line for a terminal - shellMySQL field structure - mysqlGetting Youtube Video - iphoneAll Articles