I would like to get all possible available currencies.
Java 7 had provided such feature.
public static Set java.util.Currency.g
Otherwise a version a little better of Baltasarq code to avoid duplication:
ArrayList currencys = new ArrayList();
Locale[] locs = Locale.getAvailableLocales();
for(Locale loc : locs) {
try {
String val=Currency.getInstance(loc).getCurrencyCode();
if(!currencys.contains(val))
currencys.add(val);
} catch(Exception exc)
{
// Locale not found
}
Collections.sort(currencys);
}
I have tested on android.