Android APIs
Added in API level 5
protected static interface

ContactsContract.ContactsColumns

android.provider.ContactsContract.ContactsColumns
Known Indirect Subclasses

Class Overview

Columns of ContactsContract.Contacts that refer to intrinsic properties of the contact, as opposed to the user-specified options found in ContactsContract.ContactOptionsColumns.

Summary

Constants
String CONTACT_LAST_UPDATED_TIMESTAMP Timestamp (milliseconds since epoch) of when this contact was last updated.
String DISPLAY_NAME The display name for the contact.
String HAS_PHONE_NUMBER An indicator of whether this contact has at least one phone number.
String IN_DEFAULT_DIRECTORY Flag that reflects whether the contact exists inside the default directory.
String IN_VISIBLE_GROUP Flag that reflects the GROUP_VISIBLE state of any ContactsContract.CommonDataKinds.GroupMembership for this contact.
String IS_USER_PROFILE Flag that reflects whether this contact represents the user's personal profile entry.
String LOOKUP_KEY An opaque value that contains hints on how to find the contact if its row id changed as a result of a sync or aggregation.
String PHOTO_FILE_ID Photo file ID of the full-size photo.
String PHOTO_ID Reference to the row in the data table holding the photo.
String PHOTO_THUMBNAIL_URI A URI that can be used to retrieve a thumbnail of the contact's photo.
String PHOTO_URI A URI that can be used to retrieve the contact's full-size photo.

Constants

public static final String CONTACT_LAST_UPDATED_TIMESTAMP

Added in API level 18

Timestamp (milliseconds since epoch) of when this contact was last updated. This includes updates to all data associated with this contact including raw contacts. Any modification (including deletes and inserts) of underlying contact data are also reflected in this timestamp.

Constant Value: "contact_last_updated_timestamp"

public static final String DISPLAY_NAME

Added in API level 5

The display name for the contact.

Type: TEXT

Constant Value: "display_name"

public static final String HAS_PHONE_NUMBER

Added in API level 5

An indicator of whether this contact has at least one phone number. "1" if there is at least one phone number, "0" otherwise.

Type: INTEGER

Constant Value: "has_phone_number"

public static final String IN_DEFAULT_DIRECTORY

Flag that reflects whether the contact exists inside the default directory. Ie, whether the contact is designed to only be visible outside search.

Constant Value: "in_default_directory"

public static final String IN_VISIBLE_GROUP

Added in API level 5

Flag that reflects the GROUP_VISIBLE state of any ContactsContract.CommonDataKinds.GroupMembership for this contact.

Constant Value: "in_visible_group"

public static final String IS_USER_PROFILE

Added in API level 14

Flag that reflects whether this contact represents the user's personal profile entry.

Constant Value: "is_user_profile"

public static final String LOOKUP_KEY

Added in API level 5

An opaque value that contains hints on how to find the contact if its row id changed as a result of a sync or aggregation.

Constant Value: "lookup"

public static final String PHOTO_FILE_ID

Added in API level 14

Photo file ID of the full-size photo. If present, this will be used to populate PHOTO_URI. The ID can also be used with CONTENT_URI to create a URI to the photo. If this is present, PHOTO_ID is also guaranteed to be populated.

Type: INTEGER

Constant Value: "photo_file_id"

public static final String PHOTO_ID

Added in API level 5

Reference to the row in the data table holding the photo. A photo can be referred to either by ID (this field) or by URI (see PHOTO_THUMBNAIL_URI and PHOTO_URI). If PHOTO_ID is null, consult PHOTO_URI or PHOTO_THUMBNAIL_URI, which is a more generic mechanism for referencing the contact photo, especially for contacts returned by non-local directories (see ContactsContract.Directory).

Type: INTEGER REFERENCES data(_id)

Constant Value: "photo_id"

public static final String PHOTO_THUMBNAIL_URI

Added in API level 11

A URI that can be used to retrieve a thumbnail of the contact's photo. A photo can be referred to either by a URI (this field or PHOTO_URI) or by ID (see PHOTO_ID). If PHOTO_ID is not null, PHOTO_URI and PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa). If the content provider does not differentiate between full-size photos and thumbnail photos, PHOTO_THUMBNAIL_URI and PHOTO_URI can contain the same value, but either both shall be null or both not null.

Type: TEXT

Constant Value: "photo_thumb_uri"

public static final String PHOTO_URI

Added in API level 11

A URI that can be used to retrieve the contact's full-size photo. If PHOTO_FILE_ID is not null, this will be populated with a URI based off CONTENT_URI. Otherwise, this will be populated with the same value as PHOTO_THUMBNAIL_URI. A photo can be referred to either by a URI (this field) or by ID (see PHOTO_ID). If either PHOTO_FILE_ID or PHOTO_ID is not null, PHOTO_URI and PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa). Thus using PHOTO_URI is a more robust method of retrieving contact photos.

Type: TEXT

Constant Value: "photo_uri"