java.lang.Object | |
↳ | android.provider.ContactsContract |
The contract between the contacts provider and applications. Contains
definitions for the supported URIs and columns. These APIs supersede
ContactsContract.Contacts
.
ContactsContract defines an extensible database of contact-related information. Contact information is stored in a three-tier data model:
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.
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).
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:
ContactsContract.Groups
, which contains information about raw contact groups
such as Gmail contact groups. The
current API does not support the notion of groups spanning multiple accounts.
ContactsContract.StatusUpdates
, which contains social status updates including IM
availability.
ContactsContract.AggregationExceptions
, which is used for manual aggregation and
disaggregation of raw contacts
ContactsContract.Settings
, which contains visibility and sync settings for accounts
and groups.
ContactsContract.SyncState
, which contains free-form data maintained on behalf of sync
adapters
ContactsContract.PhoneLookup
, which is used for quick caller-ID lookupNested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ContactsContract.AggregationExceptions | Constants for the contact aggregation exceptions table, which contains aggregation rules overriding those used by automatic aggregation. |
||||||||||
ContactsContract.BaseSyncColumns | Generic columns for use by sync adapters. | ||||||||||
ContactsContract.CommonDataKinds | Container for definitions of common data types stored in the ContactsContract.Data
table. |
||||||||||
ContactsContract.ContactNameColumns | Contact name and contact name metadata columns in the RawContacts table. | ||||||||||
ContactsContract.ContactOptionsColumns | Columns of ContactsContract.Contacts that track the user's
preferences for, or interactions with, the contact. |
||||||||||
ContactsContract.ContactStatusColumns | |||||||||||
ContactsContract.Contacts | Constants for the contacts table, which contains a record per aggregate of raw contacts representing the same person. | ||||||||||
ContactsContract.ContactsColumns | Columns of ContactsContract.Contacts that refer to intrinsic
properties of the contact, as opposed to the user-specified options
found in ContactsContract.ContactOptionsColumns . |
||||||||||
ContactsContract.Data | Constants for the data table, which contains data points tied to a raw contact. |
||||||||||
ContactsContract.DataColumns | Columns in the Data table. | ||||||||||
ContactsContract.DataColumnsWithJoins | Combines all columns returned by ContactsContract.Data table queries. |
||||||||||
ContactsContract.DataUsageFeedback |
API allowing applications to send usage information for each |
||||||||||
ContactsContract.DataUsageStatColumns | Columns in the Data_Usage_Stat table | ||||||||||
ContactsContract.DeletedContacts | Constants for the deleted contact table. | ||||||||||
ContactsContract.DeletedContactsColumns | |||||||||||
ContactsContract.Directory | A Directory represents a contacts corpus, e.g. | ||||||||||
ContactsContract.DisplayNameSources | Types of data used to produce the display name for a contact. | ||||||||||
ContactsContract.DisplayPhoto | Helper class for accessing full-size photos by photo file ID. | ||||||||||
ContactsContract.FullNameStyle | Constants for various styles of combining given name, family name etc into a full name. | ||||||||||
ContactsContract.Groups | Constants for the groups table. | ||||||||||
ContactsContract.GroupsColumns | |||||||||||
ContactsContract.Intents | Contains helper classes used to create or manage Intents
that involve contacts. |
||||||||||
ContactsContract.PhoneLookup | A table that represents the result of looking up a phone number, for example for caller ID. | ||||||||||
ContactsContract.PhoneLookupColumns | |||||||||||
ContactsContract.PhoneticNameStyle | Constants for various styles of capturing the pronunciation of a person's name. | ||||||||||
ContactsContract.Preferences | |||||||||||
ContactsContract.Presence | This class was deprecated in API level 5. This old name was never meant to be made public. Do not use. | ||||||||||
ContactsContract.PresenceColumns | Additional data mixed in with ContactsContract.StatusColumns to link
back to specific _ID entries. |
||||||||||
ContactsContract.Profile | Constants for the user's profile data, which is represented as a single contact on the device that represents the user. |
||||||||||
ContactsContract.ProfileSyncState | A table provided for sync adapters to use for storing private sync state data for the user's personal profile. | ||||||||||
ContactsContract.QuickContact | Helper methods to display QuickContact dialogs that allow users to pivot on
a specific Contacts entry. |
||||||||||
ContactsContract.RawContacts | Constants for the raw contacts table, which contains one row of contact information for each person in each synced account. | ||||||||||
ContactsContract.RawContactsColumns | |||||||||||
ContactsContract.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. |
||||||||||
ContactsContract.Settings |
Contacts-specific settings for various |
||||||||||
ContactsContract.SettingsColumns | |||||||||||
ContactsContract.StatusColumns | Social status update columns. | ||||||||||
ContactsContract.StatusUpdates |
A status update is linked to a |
||||||||||
ContactsContract.StreamItemPhotos | Constants for the stream_item_photos table, which contains photos associated with social stream updates. |
||||||||||
ContactsContract.StreamItemPhotosColumns | Columns in the StreamItemPhotos table. | ||||||||||
ContactsContract.StreamItems | Constants for the stream_items table, which contains social stream updates from the user's contact list. |
||||||||||
ContactsContract.StreamItemsColumns | Columns in the StreamItems table. | ||||||||||
ContactsContract.SyncColumns | Columns that appear when each row of a table belongs to a specific account, including sync information that an account may need. | ||||||||||
ContactsContract.SyncState | A table provided for sync adapters to use for storing private sync state data for contacts. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | AUTHORITY | The authority for the contacts provider | |||||||||
String | CALLER_IS_SYNCADAPTER | An optional URI parameter for insert, update, or delete queries that allows the caller to specify that it is a sync adapter. | |||||||||
String | DIRECTORY_PARAM_KEY | Query parameter that should be used by the client to access a specific
ContactsContract.Directory . |
|||||||||
String | LIMIT_PARAM_KEY | A query parameter that limits the number of results returned. | |||||||||
String | PRIMARY_ACCOUNT_NAME | A query parameter specifing a primary account. | |||||||||
String | PRIMARY_ACCOUNT_TYPE | A query parameter specifing a primary account. | |||||||||
String | REMOVE_DUPLICATE_ENTRIES | A boolean parameter for Phone.CONTENT_URI ,
Email.CONTENT_URI , and
StructuredPostal.CONTENT_URI . |
|||||||||
String | STREQUENT_PHONE_ONLY | A boolean parameter for CONTENT_STREQUENT_URI and
CONTENT_STREQUENT_FILTER_URI , which requires the ContactsProvider to
return only phone-related results. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AUTHORITY_URI | A content:// style uri to the authority for the contacts provider |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method can be used to identify whether the given ID is associated with profile
data.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The authority for the contacts provider
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
.
Query parameter that should be used by the client to access a specific
ContactsContract.Directory
. The parameter value should be the _ID of the corresponding
directory, e.g.
content://com.android.contacts/data/emails/filter/acme?directory=3
A query parameter that limits the number of results returned. The parameter value should be an integer.
A query parameter specifing a primary account. This parameter should be used with
PRIMARY_ACCOUNT_TYPE
. The contacts provider handling a query may rely on
this information to optimize its query results.
For example, in an email composition screen, its implementation can specify an account when
obtaining possible recipients, letting the provider know which account is selected during
the composition. The provider may use the "primary account" information to optimize
the search result.
A query parameter specifing a primary account. This parameter should be used with
PRIMARY_ACCOUNT_NAME
. See the doc in PRIMARY_ACCOUNT_NAME
.
A boolean parameter for Phone.CONTENT_URI
,
Email.CONTENT_URI
, and
StructuredPostal.CONTENT_URI
.
This enables a content provider to remove duplicate entries in results.
A boolean parameter for CONTENT_STREQUENT_URI
and
CONTENT_STREQUENT_FILTER_URI
, which requires the ContactsProvider to
return only phone-related results. For example, frequently contacted person list should
include persons contacted via phone (not email, sms, etc.)
A content:// style uri to the authority for the contacts provider
This method can be used to identify whether the given ID is associated with profile data. It does not necessarily indicate that the ID is tied to valid data, merely that accessing data using this ID will result in profile access checks and will only return data from the profile.
id | The ID to check. |
---|