When I use call getFromLocationName I get an IOException with description \"grpc failed\".
Code that\'s ran
@Override
public void onMapReady(GoogleMa
This worked for me.
SomeTimes Geocoder failed when latitude and longitude contain above 3 decimal places, or it may be said that Geocoder can not decode every latitude and longitude. you need to limit latitude and longitude up to 3 decimal places.
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(3);
double lat = Double.parseDouble(df.format(currentUserLocation.latitude));
double lon = Double.parseDouble(df.format(currentUserLocation.longitude));
Geocoder geocoder = new Geocoder(myContext, Locale.getDefault());
List addresses = geocoder.getFromLocation(lat,lon, 1);
String cityName = addresses.get(0).getLocality();
Source : https://github.com/xamarin/Essentials/issues/759#issuecomment-621270050