Geocoder geocoder = new Geocoder(this, Locale.US);
The above code returns the address in English irrespective of device language. But in Dubai, the above code is not working and returns the address in Arabic.
How I get the address in English in Dubai using Geocoder?
What if you tricked the
Contextthat you pass to theGeoCoder?For example, by changing the context locale like in the following Kotlin code:
I haven't tried it, just an idea that came to mind. My guess is the
GeoCoderuses the passedContextto detect the preferred locale.