public static final class

ContactsContract.CommonDataKinds.StructuredPostal

extends Object
implements ContactsContract.CommonDataKinds.CommonColumns ContactsContract.DataColumnsWithJoins
java.lang.Object
   ↳android.provider.ContactsContract.CommonDataKinds.StructuredPostal

Class Overview

A data kind representing a postal addresses.

You can use all columns defined for ContactsContract.Data as well as the following aliases.

Column aliases

TypeAliasData column
StringFORMATTED_ADDRESSDATA1
intTYPEDATA2Allowed values are:

StringLABELDATA3
StringSTREETDATA4
StringPOBOXDATA5Post Office Box number
StringNEIGHBORHOODDATA6
StringCITYDATA7
StringREGIONDATA8
StringPOSTCODEDATA9
StringCOUNTRYDATA10

Summary

Constants
StringCITYCan be city, village, town, borough, etc.
StringCONTENT_ITEM_TYPEMIME type used when storing this in data table.
StringCONTENT_TYPEThe MIME type of CONTENT_URI providing a directory of postal addresses.
UriCONTENT_URIThe content:// style URI for all data records of the CONTENT_ITEM_TYPE MIME type.
StringCOUNTRYThe name or code of the country.
StringFORMATTED_ADDRESSThe full, unstructured postal address.
StringNEIGHBORHOODThis is used to disambiguate a street address when a city contains more than one street with the same name, or to specify a small place whose mail is routed through a larger postal town.
StringPOBOXCovers actual P.O.
StringPOSTCODEPostal code.
StringREGIONA state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
StringSTREETCan be street, avenue, road, etc.
intTYPE_HOME
intTYPE_OTHER
intTYPE_WORK
[Expand]
Inherited Constants
From interface android.provider.BaseColumns
From interface android.provider.ContactsContract.CommonDataKinds.BaseTypes
From interface android.provider.ContactsContract.CommonDataKinds.CommonColumns
From interface android.provider.ContactsContract.ContactOptionsColumns
From interface android.provider.ContactsContract.ContactStatusColumns
From interface android.provider.ContactsContract.ContactsColumns
From interface android.provider.ContactsContract.DataColumns
From interface android.provider.ContactsContract.DataColumnsWithJoins
From interface android.provider.ContactsContract.RawContactsColumns
From interface android.provider.ContactsContract.StatusColumns
Public Methods
final static CharSequence getTypeLabel(Resources res, int type, CharSequence label)
Return a CharSequence that best describes the given type, possibly substituting the given LABEL value for TYPE_CUSTOM.
final static int getTypeLabelResource(int type)
Return the string resource that best describes the given TYPE.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CITY

Since: API Level 5

Can be city, village, town, borough, etc. This is the postal town and not necessarily the place of residence or place of business.

Type: TEXT

Constant Value: "data7"

public static final String CONTENT_ITEM_TYPE

Since: API Level 5

MIME type used when storing this in data table.

Constant Value: "vnd.android.cursor.item/postal-address_v2"

public static final String CONTENT_TYPE

Since: API Level 5

The MIME type of CONTENT_URI providing a directory of postal addresses.

Constant Value: "vnd.android.cursor.dir/postal-address_v2"

public static final Uri CONTENT_URI

Since: API Level 5

The content:// style URI for all data records of the CONTENT_ITEM_TYPE MIME type.

public static final String COUNTRY

Since: API Level 5

The name or code of the country.

Type: TEXT

Constant Value: "data10"

public static final String FORMATTED_ADDRESS

Since: API Level 5

The full, unstructured postal address. This field must be consistent with any structured data.

Type: TEXT

Constant Value: "data1"

public static final String NEIGHBORHOOD

Since: API Level 5

This is used to disambiguate a street address when a city contains more than one street with the same name, or to specify a small place whose mail is routed through a larger postal town. In China it could be a county or a minor city.

Type: TEXT

Constant Value: "data6"

public static final String POBOX

Since: API Level 5

Covers actual P.O. boxes, drawers, locked bags, etc. This is usually but not always mutually exclusive with street.

Type: TEXT

Constant Value: "data5"

public static final String POSTCODE

Since: API Level 5

Postal code. Usually country-wide, but sometimes specific to the city (e.g. "2" in "Dublin 2, Ireland" addresses).

Type: TEXT

Constant Value: "data9"

public static final String REGION

Since: API Level 5

A state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

Type: TEXT

Constant Value: "data8"

public static final String STREET

Since: API Level 5

Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

Type: TEXT

Constant Value: "data4"

public static final int TYPE_HOME

Since: API Level 5

Constant Value: 1 (0x00000001)

public static final int TYPE_OTHER

Since: API Level 5

Constant Value: 3 (0x00000003)

public static final int TYPE_WORK

Since: API Level 5

Constant Value: 2 (0x00000002)

Public Methods

public static final CharSequence getTypeLabel (Resources res, int type, CharSequence label)

Since: API Level 5

Return a CharSequence that best describes the given type, possibly substituting the given LABEL value for TYPE_CUSTOM.

public static final int getTypeLabelResource (int type)

Since: API Level 5

Return the string resource that best describes the given TYPE. Will always return a valid resource.