Currency symbol for iso code on Android

Is there a way to convert a currency symbol to the corresponding ISO code in Java / Android?

I saw that the Google Play on-app APIv3 API can send us the price of the product, including the currency symbol, but then we save the price and currency in different fields, so we can confirm whether the payment has a valid currency.

I know that I can iterate over all locales and compare currency symbols, but I think there should be an easier way to accomplish this task.

Thanks a lot!

// Edited 1/11/2013

I just realized that it is impossible to display a currency symbol in my currency code, because there are many countries that have the same symbol.

Perhaps the right question is: how can I find out how much money and in what currency the user paid?

+4
source share

All Articles