Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

235
Visualizações
Android locale currency symbol error

I'm trying get currency symbol based on where is user located (what language he have in smartphone). I'm using this code

String currency = Currency.getInstance(Locale.getDefault()).getSymbol();

On my phone Xiaomi Redmi 4 Prime it works. I tested english(GB,US), german and slovak language. But when I run test on firebase testlab devices I got error

Unsupported ISO 3166 country: de

I was looking into methods in Locale and Currency and I found

Locale.getDefault().getVariant() + "  " + Locale.getDefault().getCountry()

this code return on my smartphone in Slovak language " SK" and in German language " DE" but on firebase devices it returns " " nothing. And

Currency.getInstance

is using locale.getCountry() to determine country.

Thanks you any answers.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda