android.location.Address
A class representing an Address, i.e, a set of Strings describing a location.
The addres format is a simplified version of xAL (eXtensible Address Language)
http://www.oasis-open.org/committees/ciq/ciq.html#6
Summary
Constants
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
Public Constructors
public
Address(Locale locale)
Constructs a new Address object set to the given Locale and with all
other fields initialized to null or false.
Public Methods
public
void
clearLatitude()
Removes any latitude associated with this address.
public
void
clearLongitude()
Removes any longitude associated with this address.
public
int
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
public
String
getAddressLine(int index)
Returns a line of the address numbered by the given index
(starting at 0), or null if no such line is present.
public
String
getAdminArea()
Returns the administrative area name of the address, for example, "CA", or null if
it is unknown
public
String
getCountryCode()
Returns the country code of the address, for example "US",
or null if it is unknown.
public
String
getCountryName()
Returns the localized country name of the address, for example "Iceland",
or null if it is unknown.
public
Bundle
getExtras()
Returns additional provider-specific information about the
address as a Bundle. The keys and values are determined
by the provider. If no additional information is available,
null is returned.
public
String
getFeatureName()
Returns the feature name of the address, for example, "Golden Gate Bridge", or null
if it is unknown
public
double
getLatitude()
Returns the latitude of the address if known.
public
Locale
getLocale()
Returns the Locale associated with this address.
public
String
getLocality()
Returns the locality of the address, for example "Mountain View", or null if it is unknown.
public
double
getLongitude()
Returns the longitude of the address if known.
public
int
getMaxAddressLineIndex()
Returns the largest index currently in use to specify an address line.
If no address lines are specified, -1 is returned.
public
String
getPhone()
Returns the phone number of the address if known,
or null if it is unknown.
public
String
getPostalCode()
Returns the postal code of the address, for example "94110",
or null if it is unknown.
public
String
getSubAdminArea()
Returns the sub-administrative area name of the address, for example, "Santa Clara County",
or null if it is unknown
public
String
getThoroughfare()
Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway",
which may be null
public
String
getUrl()
Returns the public URL for the address if known,
or null if it is unknown.
public
boolean
hasLatitude()
Returns true if a latitude has been assigned to this Address,
false otherwise.
public
boolean
hasLongitude()
Returns true if a longitude has been assigned to this Address,
false otherwise.
public
void
setAddressLine(int index, String line)
Sets the line of the address numbered by index (starting at 0) to the
given String, which may be null.
public
void
setAdminArea(String adminArea)
Sets the administrative area name of the address to the given String, which may be null
public
void
setCountryCode(String countryCode)
Sets the country code of the address to the given String, which may
be null.
public
void
setCountryName(String countryName)
Sets the country name of the address to the given String, which may
be null.
public
void
setExtras(Bundle extras)
Sets the extra information associated with this fix to the
given Bundle.
public
void
setFeatureName(String featureName)
Sets the feature name of the address to the given String, which may be null
public
void
setLatitude(double latitude)
Sets the latitude associated with this address.
public
void
setLocality(String locality)
Sets the locality of the address to the given String, which may be null.
public
void
setLongitude(double longitude)
Sets the longitude associated with this address.
public
void
setPhone(String phone)
Sets the phone number associated with this address.
public
void
setPostalCode(String postalCode)
Sets the postal code of the address to the given String, which may
be null.
public
void
setSubAdminArea(String subAdminArea)
Sets the sub-administrative area name of the address to the given String, which may be null
public
void
setThoroughfare(String thoroughfare)
Sets the thoroughfare name of the address, which may be null.
public
void
setUrl(String Url)
Sets the public URL associated with this address.
public
String
toString()
Returns a string containing a concise, human-readable description of the
receiver.
Returns
- String a printable representation for the receiver.
public
void
writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel.