Question

I want to get the currency name by country code. I get the country code with the following code:

    TelephonyManager manager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
    String countrycode=manager.getNetworkCountryIso();
    System.out.println("---->"+countrycode+"<----");

Now I want to get currency by using this country code. How can i do this?

Was it helpful?

Solution

You can get the currency by using this util and load from country code.

http://developer.android.com/reference/java/util/Currency.html

OTHER TIPS

I've used the Currency class and the default Locale to get the current currency code (ISO 4217) with the following code:

Currency.getInstance(Locale.getDefault()).getCurrencyCode()

You can also replace the Locale with your custom Country Code ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top