Code example for Location

Methods: getLatitudegetLongitude

0
      return null; 
 
    final Geocoder geocoder = new Geocoder(context);
    final List<Address> addresses;
    try { 
      addresses = geocoder.getFromLocation(location.getLatitude(),
          location.getLongitude(), 1);
    } catch (IOException e) {
      return null; 
    } 
    if (addresses != null && !addresses.isEmpty())
      return addresses.get(0);
    else 
      return null; 
  } 
} 
Contextual code suggestions in your IDE  Get Codota for Java