Code example for Address

Methods: getAdminArea, getLocality, getPostalCode

0
      if (address != null) {
        /** 
        result.append(address.getThoroughfare() != null ? address.getThoroughfare() : ""); 
        result.append(", "); 
        **/ 
        result.append(address.getLocality() != null ? address.getLocality() : "");
        result.append(", ");
        result.append(address.getAdminArea());
        result.append(" " + address.getPostalCode());
 
        /** 
         * result.append(address.getAddressLine(0) != null ? 
         * address.getAddressLine(0) : ""); result.append(", "); 
         * result.append(address.getAddressLine(1) != null ? 
         * address.getAddressLine(1) : address.getLocality()); 
         **/ 
      } 
      location = result.toString();
    } 
    catch(IOException e) {
      Log.d(Tag, "Geocoder failed: " + e);