Get The Iso Country Code
How to get the iso3 country code.when i store the server but it is not store 100% of the database? I am using these code.Please help me Thanks and Advance... geocoder = new Geocod
Solution 1:
countryISO3 = context.getResources().getConfiguration().locale.getISO3Country() ?
Solution 2:
You can use the TelephonyManager: http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkCountryIso%28%29
This will get you the country of the network you're attached to.
Solution 3:
To get the ISO code from the country:
TelephonyManager tm;
tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
Stringloc= tm.getSimCountryIso();
Toast.makeText(SongsList.this, "LocaleName" + loc, Toast.LENGTH_LONG).show();
Post a Comment for "Get The Iso Country Code"