public final class

ContactsContract

extends Object
java.lang.Object
   ↳android.provider.ContactsContract

Class Overview

The contract between the contacts provider and applications. Contains definitions for the supported URIs and columns. These APIs supersede ContactsContract.Contacts.

Overview

ContactsContract defines an extensible database of contact-related information. Contact information is stored in a three-tier data model:

  • A row in the ContactsContract.Data table can store any kind of personal data, such as a phone number or email addresses. The set of data kinds that can be stored in this table is open-ended. There is a predefined set of common kinds, but any application can add its own data kinds.
  • A row in the ContactsContract.RawContacts table represents a set of data describing a person and associated with a single account (for example, one of the user's Gmail accounts).
  • A row in the ContactsContract.Contacts table represents an aggregate of one or more RawContacts presumably describing the same person. When data in or associated with the RawContacts table is changed, the affected aggregate contacts are updated as necessary.

Other tables include:

Summary

Nested Classes
classContactsContract.AggregationExceptions

Constants for the contact aggregation exceptions table, which contains aggregation rules overriding those used by automatic aggregation. 

interfaceContactsContract.BaseSyncColumnsGeneric columns for use by sync adapters. 
classContactsContract.CommonDataKindsContainer for definitions of common data types stored in the ContactsContract.Data table. 
interfaceContactsContract.ContactOptionsColumnsColumns of ContactsContract.Contacts that track the user's preferences for, or interactions with, the contact. 
interfaceContactsContract.ContactStatusColumns 
classContactsContract.ContactsConstants for the contacts table, which contains a record per aggregate of raw contacts representing the same person. 
interfaceContactsContract.ContactsColumnsColumns of ContactsContract.Contacts that refer to intrinsic properties of the contact, as opposed to the user-specified options found in ContactsContract.ContactOptionsColumns
classContactsContract.Data

Constants for the data table, which contains data points tied to a raw contact. 

interfaceContactsContract.DataColumnsColumns in the Data table. 
interfaceContactsContract.DataColumnsWithJoinsCombines all columns returned by ContactsContract.Data table queries. 
classContactsContract.GroupsConstants for the groups table. 
interfaceContactsContract.GroupsColumns 
classContactsContract.IntentsContains helper classes used to create or manage Intents that involve contacts. 
classContactsContract.PhoneLookupA table that represents the result of looking up a phone number, for example for caller ID. 
interfaceContactsContract.PhoneLookupColumns 
classContactsContract.Presence This class is deprecated. This old name was never meant to be made public. Do not use.  
interfaceContactsContract.PresenceColumnsAdditional data mixed in with ContactsContract.ContactStatusColumns to link back to specific _ID entries. 
classContactsContract.QuickContactHelper methods to display QuickContact dialogs that allow users to pivot on a specific Contacts entry. 
classContactsContract.RawContactsConstants for the raw contacts table, which contains one row of contact information for each person in each synced account. 
interfaceContactsContract.RawContactsColumns 
classContactsContract.RawContactsEntity

Constants for the raw contacts entities table, which can be thought of as an outer join of the raw_contacts table with the data table. 

classContactsContract.Settings

Contacts-specific settings for various Account's. 

interfaceContactsContract.SettingsColumns 
interfaceContactsContract.StatusColumnsSocial status update columns. 
classContactsContract.StatusUpdates

A status update is linked to a ContactsContract.Data row and captures the user's latest status update via the corresponding source, e.g. 

interfaceContactsContract.SyncColumnsColumns that appear when each row of a table belongs to a specific account, including sync information that an account may need. 
classContactsContract.SyncStateA table provided for sync adapters to use for storing private sync state data. 
Constants
StringAUTHORITYThe authority for the contacts provider
UriAUTHORITY_URIA content:// style uri to the authority for the contacts provider
StringCALLER_IS_SYNCADAPTERAn optional URI parameter for insert, update, or delete queries that allows the caller to specify that it is a sync adapter.
Public Constructors
ContactsContract()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String AUTHORITY

Since: API Level 5

The authority for the contacts provider

Constant Value: "com.android.contacts"

public static final Uri AUTHORITY_URI

Since: API Level 5

A content:// style uri to the authority for the contacts provider

public static final String CALLER_IS_SYNCADAPTER

Since: API Level 5

An optional URI parameter for insert, update, or delete queries that allows the caller to specify that it is a sync adapter. The default value is false. If true DIRTY is not automatically set and the "syncToNetwork" parameter is set to false when calling notifyChange(android.net.Uri, android.database.ContentObserver, boolean). This prevents an unnecessary extra synchronization, see the discussion of the delete operation in ContactsContract.RawContacts.

Constant Value: "caller_is_syncadapter"

Public Constructors

public ContactsContract ()

Since: API Level 5