Android examples for Map:Address
get Address String
//package com.java2s; import android.location.Address; public class Main { public static String getAddressString(Address address) { if (address.getMaxAddressLineIndex() == -1) { return null; }//w w w .j a v a2 s .c o m StringBuilder addressStringBuilder = new StringBuilder(); for (int i = 0; i <= address.getMaxAddressLineIndex(); i++) { addressStringBuilder.append(address.getAddressLine(i)); if (i != address.getMaxAddressLineIndex()) { addressStringBuilder.append(", "); } } return addressStringBuilder.toString(); } }