Android Guides | Samples

Android.Provider Namespace

Provides convenience classes to access the content providers supplied by Android.

Remarks

Provides convenience classes to access the content providers supplied by Android.

Android ships with a number of content providers that store common data such as contact informations, calendar information, and media files. These classes provide simplified methods of adding or retrieving data from these content providers.

For information about how to use a content provider, see the Content Providers developer guide.

Classes

TypeReason
AddressDataKindEnumerates values returned by several methods of AddressDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+StructuredPostal.GetTypeLabel, ContactsContract+CommonDataKinds+StructuredPostal.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+StructuredPostal.GetTypeLabelResource members.
AggregateExceptionEnumerates values returned by the AggregateException.Automatic, AggregateException.KeepSeparate, and AggregateException.KeepTogether members.
AggregationModeEnumerates values returned by several methods of AggregationMode.
AlarmClockThe AlarmClock provider contains an Intent action and extras that can be used to start an Activity to set a new alarm or timer in an alarm clock application.
BaseColumns [Android Documentation]
BaseColumnsConsts
Browser [Android Documentation]
Browser+BookmarkColumnsColumn definitions for the mixed bookmark and history items available at Browser.BookmarksUri.
Browser+BookmarkColumns+InterfaceConsts
Browser+SearchColumnsColumn definitions for the search history table, available at Browser.SearchesUri.
Browser+SearchColumns+InterfaceConsts
CalendarAccessEnumerates values returned by several types.
CalendarAlertsStateEnumerates values returned by several types.
CalendarAttendeesColumnEnumerates values returned by several types.
CalendarAttendeesRelationshipEnumerates values returned by several types.
CalendarAttendeesStatusEnumerates values returned by several types.
CalendarColoredTypesEnumerates values returned by several types.
CalendarContract

Overview

CalendarContract+AttendeesFields and helpers for interacting with Attendees.
CalendarContract+Attendees+InterfaceConsts
CalendarContract+AttendeesColumnsColumns from the Attendees table that other tables join into themselves.
CalendarContract+AttendeesColumnsConsts
CalendarContract+CalendarAlertsFields and helpers for accessing calendar alerts information.
CalendarContract+CalendarAlerts+InterfaceConsts
CalendarContract+CalendarAlertsColumns
CalendarContract+CalendarAlertsColumnsConsts
CalendarContract+CalendarCacheCalendarCache stores some settings for calendar including the current time zone for the instances.
CalendarContract+CalendarCache+InterfaceConsts
CalendarContract+CalendarCacheColumns
CalendarContract+CalendarCacheColumnsConsts
CalendarContract+CalendarColumnsColumns specific to the Calendars Uri that other Uris can query.
CalendarContract+CalendarColumnsConsts
CalendarContract+CalendarEntityClass that represents a Calendar Entity.
CalendarContract+CalendarEntity+InterfaceConsts
CalendarContract+CalendarsConstants and helpers for the Calendars table, which contains details for individual calendars.
CalendarContract+Calendars+InterfaceConsts
CalendarContract+CalendarSyncColumnsGeneric columns for use by sync adapters.
CalendarContract+CalendarSyncColumnsConsts
CalendarContract+ColorsFields for accessing colors available for a given account.
CalendarContract+Colors+InterfaceConsts
CalendarContract+ColorsColumns
CalendarContract+ColorsColumnsConsts
CalendarContract+EventDaysFields and helpers for querying for a list of days that contain events.
CalendarContract+EventDays+InterfaceConsts
CalendarContract+EventDaysColumns
CalendarContract+EventDaysColumnsConsts
CalendarContract+EventsConstants and helpers for the Events table, which contains details for individual events.
CalendarContract+Events+InterfaceConsts
CalendarContract+EventsColumnsColumns from the Events table that other tables join into themselves.
CalendarContract+EventsColumnsConsts
CalendarContract+EventsEntityClass that represents an Event Entity.
CalendarContract+EventsEntity+InterfaceConsts
CalendarContract+ExtendedPropertiesFields for accessing the Extended Properties.
CalendarContract+ExtendedProperties+InterfaceConsts
CalendarContract+ExtendedPropertiesColumns
CalendarContract+ExtendedPropertiesColumnsConsts
CalendarContract+InstancesFields and helpers for interacting with Instances.
CalendarContract+Instances+InterfaceConsts
CalendarContract+RemindersFields and helpers for accessing reminders for an event.
CalendarContract+Reminders+InterfaceConsts
CalendarContract+RemindersColumns
CalendarContract+RemindersColumnsConsts
CalendarContract+SyncColumnsColumns for Sync information used by Calendars and Events tables.
CalendarContract+SyncColumnsConsts
CalendarContract+SyncStateA table provided for sync adapters to use for storing private sync state data.
CalendarContract+SyncState+InterfaceConsts
CallerPresentationEnumerates values returned by several types.
CallLogThe CallLog provider contains information about placed and received calls.
CallLog+CallsContains the recent calls.
CallLog+Calls+InterfaceConsts
CallTypeEnumerates values returned by several methods of CallType.
ChatCapabilityEnumerates values returned by several types.
ContactKindEnumerates values returned by several methods of ContactKind and taken as a parameter of the Contacts+ContactMethods.GetDisplayLabel, and Contacts+ContactMethods.GetDisplayLabelFormatted members.
ContactMethodColumnEnumerates values returned by several methods of ContactMethodColumn and taken as a parameter of the Contacts+ContactMethods.GetDisplayLabel, and Contacts+ContactMethods.GetDisplayLabelFormatted members.
ContactOrganizationColumnEnumerates values returned by the ContactOrganizationColumn.Custom, ContactOrganizationColumn.Other, and ContactOrganizationColumn.Work members and taken as a parameter of the Contacts+Organizations.GetDisplayLabel, and Contacts+Organizations.GetDisplayLabelFormatted members.
ContactPhoneColumnEnumerates values returned by several methods of ContactPhoneColumn and taken as a parameter of several methods of Contacts+Phones.
ContactPresenceStatusEnumerates values returned by several types.
ContactProtocolEnumerates values returned by several methods of ContactProtocol.
ContactsThe Contacts provider stores all information about contacts.
Contacts+ContactMethodsThis table stores all non-phone contact methods and a reference to the person that the contact method belongs to.
Contacts+ContactMethods+InterfaceConsts
Contacts+ContactMethodsColumnsColumns from the ContactMethods table that other tables join into themseleves.
Contacts+ContactMethodsColumnsConsts
Contacts+ExtensionsThe extensions for a person
Contacts+Extensions+InterfaceConsts
Contacts+ExtensionsColumns
Contacts+ExtensionsColumnsConsts
Contacts+GroupMembership
Contacts+GroupMembership+InterfaceConsts
Contacts+GroupsThis table contains the groups for an account.
Contacts+Groups+InterfaceConsts
Contacts+GroupsColumnsColumns from the groups table.
Contacts+GroupsColumnsConsts
Contacts+IntentsContains helper classes used to create or manage Intent that involve contacts.
Contacts+Intents+InsertConvenience class that contains string constants used to create contact Intent.
Contacts+Intents+UIIntents related to the Contacts app UI.
Contacts+OrganizationColumnsColumns from the Organizations table that other columns join into themselves.
Contacts+OrganizationColumnsConsts
Contacts+OrganizationsA sub directory of a single person that contains all of their Phones.
Contacts+Organizations+InterfaceConsts
Contacts+PeopleThis table contains people.
Contacts+People+ContactMethodsA subdirectory of a single person that contains all of their ContactMethods.
Contacts+People+ContactMethods+InterfaceConsts
Contacts+People+ExtensionsThe extensions for a person
Contacts+People+Extensions+InterfaceConsts
Contacts+People+InterfaceConsts
Contacts+People+PhonesA sub directory of a single person that contains all of their Phones.
Contacts+People+Phones+InterfaceConsts
Contacts+PeopleColumnsColumns from the People table that other tables join into themselves.
Contacts+PeopleColumnsConsts
Contacts+PhonesThis table stores phone numbers and a reference to the person that the contact method belongs to.
Contacts+Phones+InterfaceConsts
Contacts+PhonesColumnsColumns from the Phones table that other columns join into themselves.
Contacts+PhonesColumnsConsts
Contacts+PhotosThe photos over all of the people
Contacts+Photos+InterfaceConsts
Contacts+PhotosColumnsColumns from the Photos table that other columns join into themselves.
Contacts+PhotosColumnsConsts
Contacts+PresenceColumnsThe IM presence columns with some contacts specific columns mixed in.
Contacts+PresenceColumnsConsts
Contacts+SettingsThe settings over all of the people
Contacts+Settings+InterfaceConsts
Contacts+SettingsColumnsColumns from the Settings table that other columns join into themselves.
Contacts+SettingsColumnsConsts
ContactsContract

Overview

ContactsContract+AggregationExceptions

Columns

AggregationExceptions
int AggregationExceptions.Type read/write The type of exception: AggregateException.KeepTogether, AggregateException.KeepSeparate or AggregateException.Automatic.
long AggregationExceptions.RawContactId1 read/write A reference to the BaseColumns.Id of the raw contact that the rule applies to.
long AggregationExceptions.RawContactId2 read/write A reference to the other BaseColumns.Id of the raw contact that the rule applies to.
ContactsContract+AggregationExceptions+InterfaceConsts
ContactsContract+BaseSyncColumnsGeneric columns for use by sync adapters.
ContactsContract+BaseSyncColumnsConsts
ContactsContract+CommonDataKindsContainer for definitions of common data types stored in the ContactsContract+Data table.
ContactsContract+CommonDataKinds+BaseTypesThe base types that all "Typed" data kinds support.
ContactsContract+CommonDataKinds+BaseTypesConsts
ContactsContract+CommonDataKinds+Callable
ContactsContract+CommonDataKinds+Callable+InterfaceConsts
ContactsContract+CommonDataKinds+CommonColumnsColumns common across the specific types.
ContactsContract+CommonDataKinds+CommonColumnsConsts
ContactsContract+CommonDataKinds+ContactablesA special class of data items, used to refer to types of data that can be used to attempt to start communicating with a person (ContactsContract+CommonDataKinds+Phone and ContactsContract+CommonDataKinds+Email).
ContactsContract+CommonDataKinds+Contactables+InterfaceConsts
ContactsContract+CommonDataKinds+Email

Column aliases

Type Alias Data column
String Email.Address ContactsContract+DataColumns.Data1 Email address itself.
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Email+InterfaceConsts
ContactsContract+CommonDataKinds+Event

Column aliases

Type Alias Data column
String Event.StartDate ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Event+InterfaceConsts
ContactsContract+CommonDataKinds+GroupMembership

Column aliases

Type Alias Data column
long GroupMembership.GroupRowId ContactsContract+DataColumns.Data1
String GroupMembership.GroupSourceId none If this field is specified, the provider will first try to look up a group with this ContactsContract+Groups. If such a group is found, it will use the corresponding row id. If the group is not found, it will create one.
ContactsContract+CommonDataKinds+GroupMembership+InterfaceConsts
ContactsContract+CommonDataKinds+IdentityA data kind representing an Identity related to the contact.
ContactsContract+CommonDataKinds+Identity+InterfaceConsts
ContactsContract+CommonDataKinds+Im

Column aliases

Type Alias Data column
String CommonColumns.Data ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
String Im.Protocol DataColumns.Data5
String Im.CustomProtocol DataColumns.Data6
ContactsContract+CommonDataKinds+Im+InterfaceConsts
ContactsContract+CommonDataKinds+Nickname

Column aliases

Type Alias Data column
String Nickname.Name ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Nickname+InterfaceConsts
ContactsContract+CommonDataKinds+Note

Column aliases

Type Alias Data column
String Note.NoteColumnId ContactsContract+DataColumns.Data1
ContactsContract+CommonDataKinds+Note+InterfaceConsts
ContactsContract+CommonDataKinds+Organization

Column aliases

Type Alias Data column
String Organization.Company ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
String Organization.Title DataColumns.Data4
String Organization.Department DataColumns.Data5
String Organization.JobDescription DataColumns.Data6
String Organization.Symbol DataColumns.Data7
String Organization.PhoneticName DataColumns.Data8
String Organization.OfficeLocation DataColumns.Data9
String PHONETIC_NAME_STYLE ContactsContract+DataColumns.Data1
ContactsContract+CommonDataKinds+Organization+InterfaceConsts
ContactsContract+CommonDataKinds+Phone

Column aliases

Type Alias Data column
String Phone.Number ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Phone+InterfaceConsts
ContactsContract+CommonDataKinds+Photo

Column aliases

Type Alias Data column
NUMBER Photo.PhotoFileId ContactsContract+DataColumns.Data1 ID of the hi-res photo file.
BLOB Photo.PhotoColumnId ContactsContract+DataColumns.Data1 By convention, binary data is stored in DATA15. The thumbnail of the photo is stored in this column.
ContactsContract+CommonDataKinds+Photo+InterfaceConsts
ContactsContract+CommonDataKinds+Relation

Column aliases

Type Alias Data column
String Relation.Name ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Relation+InterfaceConsts
ContactsContract+CommonDataKinds+SipAddress

Column aliases

Type Alias Data column
String SipAddress.SipAddressColumnId ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+SipAddress+InterfaceConsts
ContactsContract+CommonDataKinds+StructuredNameA data kind representing the contact's proper name.
ContactsContract+CommonDataKinds+StructuredName+InterfaceConsts
ContactsContract+CommonDataKinds+StructuredPostal

Column aliases

Type Alias Data column
String StructuredPostal.FormattedAddress ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
String StructuredPostal.Street DataColumns.Data4
String StructuredPostal.Pobox DataColumns.Data5 Post Office Box number
String StructuredPostal.Neighborhood DataColumns.Data6
String StructuredPostal.City DataColumns.Data7
String StructuredPostal.Region DataColumns.Data8
String StructuredPostal.Postcode DataColumns.Data9
String StructuredPostal.Country ContactsContract+DataColumns.Data1
ContactsContract+CommonDataKinds+StructuredPostal+InterfaceConsts
ContactsContract+CommonDataKinds+Website

Column aliases

Type Alias Data column
String Website.Url ContactsContract+DataColumns.Data1
int ContactsContract+CommonDataKinds+CommonColumns.Type ContactsContract+DataColumns.Data2 Allowed values are:
String ContactsContract+CommonDataKinds+CommonColumns.Label ContactsContract+DataColumns.Data3
ContactsContract+CommonDataKinds+Website+InterfaceConsts
ContactsContract+ContactNameColumnsContact name and contact name metadata columns in the RawContacts table.
ContactsContract+ContactNameColumnsConsts
ContactsContract+ContactOptionsColumnsColumns of ContactsContract+Contacts that track the user's preferences for, or interactions with, the contact.
ContactsContract+ContactOptionsColumnsConsts
ContactsContract+ContactsConstants for the contacts table, which contains a record per aggregate of raw contacts representing the same person.
ContactsContract+Contacts+AggregationSuggestions
ContactsContract+Contacts+AggregationSuggestions+InterfaceConsts
ContactsContract+Contacts+DataA sub-directory of a single contact that contains all of the constituent raw contact ContactsContract+Data rows.
ContactsContract+Contacts+Data+InterfaceConsts
ContactsContract+Contacts+Entity
ContactsContract+Contacts+Entity+InterfaceConsts
ContactsContract+Contacts+InterfaceConsts
ContactsContract+Contacts+PhotoA read-only sub-directory of a single contact that contains the contact's primary photo.
ContactsContract+Contacts+Photo+InterfaceConsts
ContactsContract+Contacts+StreamItems
ContactsContract+Contacts+StreamItems+InterfaceConsts
ContactsContract+ContactsColumnsColumns of ContactsContract+Contacts that refer to intrinsic properties of the contact, as opposed to the user-specified options found in ContactsContract+ContactOptionsColumns.
ContactsContract+ContactsColumnsConsts
ContactsContract+ContactStatusColumns
ContactsContract+ContactStatusColumnsConsts
ContactsContract+Data
ContactsContract+Data+InterfaceConsts
ContactsContract+DataColumnsColumns in the Data table.
ContactsContract+DataColumnsConsts
ContactsContract+DataUsageFeedback
ContactsContract+DataUsageStatColumnsColumns in the Data_Usage_Stat table
ContactsContract+DataUsageStatColumnsConsts
ContactsContract+DeletedContactsConstants for the deleted contact table.
ContactsContract+DeletedContacts+InterfaceConsts
ContactsContract+DeletedContactsColumns
ContactsContract+DeletedContactsColumnsConsts
ContactsContract+DirectoryA Directory represents a contacts corpus, e.g.
ContactsContract+Directory+InterfaceConsts
ContactsContract+DisplayNameSourcesTypes of data used to produce the display name for a contact.
ContactsContract+DisplayNameSourcesConsts
ContactsContract+DisplayPhotoHelper class for accessing full-size photos by photo file ID.
ContactsContract+FullNameStyleConstants for various styles of combining given name, family name etc into a full name.
ContactsContract+FullNameStyleConsts
ContactsContract+GroupsConstants for the groups table.
ContactsContract+Groups+InterfaceConsts
ContactsContract+GroupsColumns
ContactsContract+GroupsColumnsConsts
ContactsContract+IntentsContains helper classes used to create or manage Intent that involve contacts.
ContactsContract+Intents+InsertConvenience class that contains string constants used to create contact Intent.
ContactsContract+PhoneLookupA table that represents the result of looking up a phone number, for example for caller ID.
ContactsContract+PhoneLookup+InterfaceConsts
ContactsContract+PhoneLookupColumns
ContactsContract+PhoneLookupColumnsConsts
ContactsContract+PhoneticNameStyleConstants for various styles of capturing the pronunciation of a person's name.
ContactsContract+PhoneticNameStyleConsts
ContactsContract+PinnedPositions
ContactsContract+Presence
ContactsContract+PresenceColumnsAdditional data mixed in with ContactsContract+ContactStatusColumns to link back to specific BaseColumns.Id entries.
ContactsContract+PresenceColumnsConsts
ContactsContract+Profile

Operations

Insert
The user's profile entry cannot be created explicitly (attempting to do so will throw an exception). When a raw contact is inserted into the profile, the provider will check for the existence of a profile on the device. If one is found, the raw contact's ContactsContract+RawContactsColumns.ContactId column gets the _ID of the profile Contact. If no match is found, the profile Contact is created and its _ID is put into the ContactsContract+RawContactsColumns.ContactId column of the newly inserted raw contact.
Update
The profile Contact has the same update restrictions as Contacts in general, but requires the android.permission.WRITE_PROFILE permission.
Delete
The profile Contact cannot be explicitly deleted. It will be removed automatically if all of its constituent raw contact entries are deleted.
Query
  • The Profile.ContentUri for profiles behaves in much the same way as retrieving a contact by ID, except that it will only ever return the user's profile contact.
  • The profile contact supports all of the same sub-paths as an individual contact does - the content of the profile contact can be retrieved as entities or data rows. Similarly, specific raw contact entries can be retrieved by appending the desired raw contact ID within the profile.
ContactsContract+Profile+InterfaceConsts
ContactsContract+ProfileSyncStateA table provided for sync adapters to use for storing private sync state data for the user's personal profile.
ContactsContract+ProfileSyncState+InterfaceConsts
ContactsContract+QuickContactHelper methods to display QuickContact dialogs that allow users to pivot on a specific Contacts entry.
ContactsContract+RawContactsConstants for the raw contacts table, which contains one row of contact information for each person in each synced account.
ContactsContract+RawContacts+DataA sub-directory of a single raw contact that contains all of its ContactsContract+Data rows.
ContactsContract+RawContacts+Data+InterfaceConsts
ContactsContract+RawContacts+DisplayPhoto
ContactsContract+RawContacts+Entity
ContactsContract+RawContacts+Entity+InterfaceConsts
ContactsContract+RawContacts+InterfaceConsts
ContactsContract+RawContacts+StreamItems
ContactsContract+RawContacts+StreamItems+InterfaceConsts
ContactsContract+RawContactsColumns
ContactsContract+RawContactsColumnsConsts
ContactsContract+RawContactsEntity
ContactsContract+RawContactsEntity+InterfaceConsts
ContactsContract+SearchSnippets
ContactsContract+Settings

Columns

Settings
String SettingsColumns.AccountName read/write-once The name of the account instance to which this row belongs.
String SettingsColumns.AccountType read/write-once The type of account to which this row belongs, which when paired with SettingsColumns.AccountName identifies a specific account.
int SettingsColumns.ShouldSync read/write Depending on the mode defined by the sync-adapter, this flag controls the top-level sync behavior for this data source.
int SettingsColumns.UngroupedVisible read/write Flag indicating if contacts without any ContactsContract+CommonDataKinds+GroupMembership entries should be visible in any user interface.
int SettingsColumns.AnyUnsynced read-only Read-only flag indicating if this SettingsColumns.ShouldSync or any GroupsColumns.ShouldSync under this account have been marked as unsynced.
int SettingsColumns.UngroupedCount read-only Read-only count of Contacts from a specific source that have no ContactsContract+CommonDataKinds+GroupMembership entries.
int SettingsColumns.UngroupedWithPhones read-only Read-only count of Contacts from a specific source that have no ContactsContract+CommonDataKinds+GroupMembership entries, and also have phone numbers.
ContactsContract+Settings+InterfaceConsts
ContactsContract+SettingsColumns
ContactsContract+SettingsColumnsConsts
ContactsContract+StatusColumnsSocial status update columns.
ContactsContract+StatusColumnsConsts
ContactsContract+StatusUpdates

Columns

StatusUpdates
long PresenceColumns.DataId read/write Reference to the BaseColumns.Id entry that owns this presence. If this field is not specified, the provider will attempt to find a data row that matches the ContactsContract+PresenceColumns.Protocol (or PresenceColumns.CustomProtocol) and PresenceColumns.ImHandle columns.
long ContactsContract+PresenceColumns.Protocol read/write See ContactsContract+CommonDataKinds+Im for a list of defined protocol constants.
String PresenceColumns.CustomProtocol read/write Name of the custom protocol. Should be supplied along with the ContactsContract+PresenceColumns.Protocol value IMProtocolDataKind.Custom. Should be null or omitted if ContactsContract+PresenceColumns.Protocol value is not IMProtocolDataKind.Custom.
String PresenceColumns.ImHandle read/write The IM handle the presence item is for. The handle is scoped to ContactsContract+PresenceColumns.Protocol.
String PresenceColumns.ImAccount read/write The IM account for the local user that the presence data came from.
int ContactsContract+StatusColumns.Presence read/write Contact IM presence status. The allowed values are:
int StatusColumns.ChatCapability read/write Contact IM chat compatibility value. The allowed values combinations of the following flags. If None of these flags is set, the device can only do text messaging.
String StatusColumns.Status read/write Contact's latest status update, e.g. "having toast for breakfast"
long StatusColumns.StatusTimestamp read/write The absolute time in milliseconds when the status was entered by the user. If this value is not provided, the provider will follow this logic: if there was no prior status update, the value will be left as null. If there was a prior status update, the provider will default this field to the current time.
String ContactsContract+StatusColumns.StatusResPackage read/write The package containing resources for this status: label and icon.
long StatusColumns.StatusLabel read/write The resource ID of the label describing the source of contact status, e.g. "Google Talk". This resource is scoped by the ContactsContract+StatusColumns.StatusResPackage.
long StatusColumns.StatusIcon read/write The resource ID of the icon for the source of contact status. This resource is scoped by the ContactsContract+StatusColumns.StatusResPackage.
ContactsContract+StatusUpdates+InterfaceConsts
ContactsContract+StreamItemPhotos

Account check

Operations

Insert
Update
Delete
Deletes can be made against either a specific photo item in a stream item, or against all or a selected subset of photo items under a stream item. For example:
Deleting a single photo via the StreamItemPhotos.ContentDirectory sub-path of a stream item:
Deleting all photos under a stream item
Query
Querying for a specific photo in a stream item

java Example

 Cursor c = getContentResolver().query(
     ContentUris.withAppendedId(
         Uri.withAppendedPath(
             ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId)
             StreamItems.StreamItemPhotos#CONTENT_DIRECTORY),
         streamItemPhotoId), null, null, null, null);
Querying for all photos in a stream item

java Example

 Cursor c = getContentResolver().query(
     Uri.withAppendedPath(
         ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId)
         StreamItems.StreamItemPhotos#CONTENT_DIRECTORY),
     null, null, null, StreamItemPhotos.SORT_INDEX);
The record will contain both a StreamItemPhotosColumns.PhotoFileId and a StreamItemPhotosColumns.PhotoUri. The StreamItemPhotosColumns.PhotoFileId can be used in conjunction with the ContactsContract+DisplayPhoto API to retrieve photo content, or you can open the StreamItemPhotosColumns.PhotoUri as an asset file, as follows:

java Example

 public InputStream openDisplayPhoto(String photoUri) {
     try {
         AssetFileDescriptor fd = getContentResolver().openAssetFileDescriptor(photoUri, "r");
         return fd.createInputStream();
     } catch (IOException e) {
         return null;
     }
 }
ContactsContract+StreamItemPhotos+InterfaceConsts
ContactsContract+StreamItemPhotosColumnsColumns in the StreamItemPhotos table.
ContactsContract+StreamItemPhotosColumnsConsts
ContactsContract+StreamItems
ContactsContract+StreamItems+InterfaceConsts
ContactsContract+StreamItems+StreamItemPhotos
ContactsContract+StreamItems+StreamItemPhotos+InterfaceConsts
ContactsContract+StreamItemsColumnsColumns in the StreamItems table.
ContactsContract+StreamItemsColumnsConsts
ContactsContract+SyncColumnsColumns that appear when each row of a table belongs to a specific account, including sync information that an account may need.
ContactsContract+SyncColumnsConsts
ContactsContract+SyncStateA table provided for sync adapters to use for storing private sync state data for contacts.
ContactsContract+SyncState+InterfaceConsts
DisplayModeEnumerates values returned by the DisplayMode.Grid, and DisplayMode.List members.
DisplayNameSourcesEnumerates values returned by several types.
DocumentContractFlagsEnumerates values returned by several types.
DocumentRootFlagsEnumerates values returned by several types.
DocumentsContractDefines the contract between a documents provider and the platform.
DocumentsContract+Document
DocumentsContract+Root
DocumentsProviderBase class for a document provider.
EmailDataKindEnumerates values returned by several methods of EmailDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Email.GetTypeLabel, ContactsContract+CommonDataKinds+Email.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Email.GetTypeLabelResource members.
EventDataKindEnumerates values returned by several methods of EventDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Event.GetTypeLabel, ContactsContract+CommonDataKinds+Event.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Event.GetTypeResource members.
EventsAccessEnumerates values returned by several types.
EventsAvailabilityEnumerates values returned by several types.
EventsStatusEnumerates values returned by several types.
ExportSupportEnumerates values returned by several types.
FullNameStyleEnumerates values returned by several types.
GlobalWifiSleepPolicyEnumerates values returned by several types.
HistoryProjectionEnumerates values returned by several methods of HistoryProjection.
IMProtocolDataKindEnumerates values returned by several methods of IMProtocolDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Im.GetProtocolLabel, ContactsContract+CommonDataKinds+Im.GetProtocolLabelFormatted, and ContactsContract+CommonDataKinds+Im.GetProtocolLabelResource members.
IMTypeDataKindEnumerates values returned by several methods of IMTypeDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Im.GetTypeLabel, ContactsContract+CommonDataKinds+Im.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Im.GetTypeLabelResource members.
LiveFolders

Lifecycle

Setting up the live folder activity

java Example

 public static class MyLiveFolder extends Activity {
     public static final Uri CONTENT_URI = Uri.parse("content://my.app/live");

     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         final Intent intent = getIntent();
         final String action = intent.getAction();

         if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
             setResult(RESULT_OK, createLiveFolder(this, CONTENT_URI, "My LiveFolder",
                     R.drawable.ic_launcher_contacts_phones));
         } else {
             setResult(RESULT_CANCELED);
         }

         finish();
     }

     private static Intent createLiveFolder(Context context, Uri uri, String name,
             int icon) {

         final Intent intent = new Intent();

         intent.setData(uri);
         intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_NAME, name);
         intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_ICON,
                 Intent.ShortcutIconResource.fromContext(context, icon));
         intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE, LiveFolders.DISPLAY_MODE_LIST);

         return intent;
     }
 }
Component Type Description Required
URI URI The ContentProvider URI Yes
LiveFolders.ExtraLiveFolderName Extra String The name of the live folder Yes
LiveFolders.ExtraLiveFolderIcon Extra NoType:android/content/Intent$ShortcutIconResource;Href=../../../reference/android/content/Intent.ShortcutIconResource.html The icon of the live folder Yes
LiveFolders.ExtraLiveFolderDisplayMode Extra int The display mode of the live folder. The value must be either Android.Provider.LiveFolders.DISPLAY_MODE_GRID or Android.Provider.LiveFolders.DISPLAY_MODE_LIST. Yes
LiveFolders.ExtraLiveFolderBaseIntent Extra Intent When the user clicks an item inside a live folder, the system will either fire the intent associated with that item or, if present, the live folder's base intent with the id of the item appended to the base intent's URI. No

Setting up the content provider

Column Type Description Required
LiveFolders.Name String The name of the item Yes
LiveFolders.Description String The description of the item. The description is ignored when the live folder's display mode is Android.Provider.LiveFolders.DISPLAY_MODE_GRID. No
LiveFolders.Intent Intent The intent to fire when the item is clicked. Ignored when the live folder defines a base intent. No
LiveFolders.IconBitmap Bitmap The icon for the item. When this column value is not null, the values for the columns LiveFolders.IconPackage and LiveFolders.IconResource must be null. No
LiveFolders.IconPackage String The package of the item's icon. When this value is not null, the value for the column LiveFolders.IconResource must be specified and the value for the column LiveFolders.IconBitmap must be null. No
LiveFolders.IconResource String The resource name of the item's icon. When this value is not null, the value for the column LiveFolders.IconPackage must be specified and the value for the column LiveFolders.IconBitmap must be null. No
LiveFolders+InterfaceConsts
LocaleTypeEnumerates values returned by the LocaleType.All, and LocaleType.Current members and taken as a parameter of the UserDictionary+Words.AddWord member.
MediaStoreThe Media provider contains meta data for all available media on both internal and external storage devices.
MediaStore+AudioContainer for all audio content.
MediaStore+Audio+AlbumColumnsColumns representing an album
MediaStore+Audio+AlbumColumnsConsts
MediaStore+Audio+AlbumsContains artists for audio files
MediaStore+Audio+Albums+InterfaceConsts
MediaStore+Audio+ArtistColumnsColumns representing an artist
MediaStore+Audio+ArtistColumnsConsts
MediaStore+Audio+ArtistsContains artists for audio files
MediaStore+Audio+Artists+AlbumsSub-directory of each artist containing all albums on which a song by the artist appears.
MediaStore+Audio+Artists+Albums+InterfaceConsts
MediaStore+Audio+Artists+InterfaceConsts
MediaStore+Audio+AudioColumnsColumns for audio file that show up in multiple tables.
MediaStore+Audio+AudioColumnsConsts
MediaStore+Audio+GenresContains all genres for audio files
MediaStore+Audio+Genres+InterfaceConsts
MediaStore+Audio+Genres+MembersSub-directory of each genre containing all members.
MediaStore+Audio+Genres+Members+InterfaceConsts
MediaStore+Audio+GenresColumnsColumns representing an audio genre
MediaStore+Audio+GenresColumnsConsts
MediaStore+Audio+Media
MediaStore+Audio+Media+InterfaceConsts
MediaStore+Audio+PlaylistsContains playlists for audio files
MediaStore+Audio+Playlists+InterfaceConsts
MediaStore+Audio+Playlists+MembersSub-directory of each playlist containing all members.
MediaStore+Audio+Playlists+Members+InterfaceConsts
MediaStore+Audio+PlaylistsColumnsColumns representing a playlist
MediaStore+Audio+PlaylistsColumnsConsts
MediaStore+Audio+Radio
MediaStore+FilesMedia provider table containing an index of all files in the media storage, including non-media files.
MediaStore+Files+FileColumnsFields for master table for all media files.
MediaStore+Files+FileColumnsConsts
MediaStore+ImagesContains meta data for all available images.
MediaStore+Images+ImageColumns
MediaStore+Images+ImageColumnsConsts
MediaStore+Images+Media
MediaStore+Images+Media+InterfaceConsts
MediaStore+Images+ThumbnailsThis class allows developers to query and get two kinds of thumbnails: MINI_KIND: 512 x 384 thumbnail MICRO_KIND: 96 x 96 thumbnail
MediaStore+Images+Thumbnails+InterfaceConsts
MediaStore+MediaColumnsCommon fields for most MediaProvider tables
MediaStore+MediaColumnsConsts
MediaStore+Video
MediaStore+Video+Media
MediaStore+Video+Media+InterfaceConsts
MediaStore+Video+ThumbnailsThis class allows developers to query and get two kinds of thumbnails: MINI_KIND: 512 x 384 thumbnail MICRO_KIND: 96 x 96 thumbnail
MediaStore+Video+Thumbnails+InterfaceConsts
MediaStore+Video+VideoColumns
MediaStore+Video+VideoColumnsConsts
MediaTypeEnumerates values returned by several types.
MessageBoxTypeEnumerates values returned by several types.
MmsSmsErrorTypeEnumerates values returned by several types.
MmsSmsProtocolEnumerates values returned by several types.
NicknameDataKindEnumerates values returned by several methods of NicknameDataKind.
OpenableColumnsThese are standard columns for openable URIs.
OpenableColumnsConsts
OrganizationDataKindEnumerates values returned by the OrganizationDataKind.Custom, OrganizationDataKind.Other, and OrganizationDataKind.Work members and taken as a parameter of the ContactsContract+CommonDataKinds+Organization.GetTypeLabel, ContactsContract+CommonDataKinds+Organization.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Organization.GetTypeLabelResource members.
PhoneDataKindEnumerates values returned by several methods of PhoneDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Phone.GetTypeLabel, ContactsContract+CommonDataKinds+Phone.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Phone.GetTypeLabelResource members.
PhoneticNameStyleEnumerates values returned by several types.
PhotoSupportEnumerates values returned by several types.
QueriesProjectionEnumerates values returned by several methods of QueriesProjection.
QuickContactModeEnumerates values returned by the QuickContactMode.Large, QuickContactMode.Medium, and QuickContactMode.Small members and taken as a parameter of the ContactsContract+QuickContact.ShowQuickContact, and ContactsContract+QuickContact.ShowQuickContact members.
RelationDataKindEnumerates values returned by several methods of RelationDataKind and taken as a parameter of the ContactsContract+CommonDataKinds+Relation.GetTypeLabel, ContactsContract+CommonDataKinds+Relation.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+Relation.GetTypeLabelResource members.
RemindersMethodEnumerates values returned by several types.
ScreenBrightnessEnumerates values returned by several types.
SearchesProjectionEnumerates values returned by the SearchesProjection.DateIndex, and SearchesProjection.SearchIndex members.
SearchRecentSuggestionsThis is a utility class providing access to SearchRecentSuggestionsProvider.
SecurityLocationModeEnumerates values returned by several types.
SettingsThe Settings provider contains global system-level device preferences.
Settings+GlobalGlobal system settings, containing preferences that always apply identically to all defined users.
Settings+NameValueTableCommon base for tables of name/value settings.
Settings+NameValueTable+InterfaceConsts
Settings+SecureSecure system settings, containing system preferences that applications can read but are not allowed to write.
Settings+SettingNotFoundException
Settings+SystemSystem settings, containing miscellaneous system preferences.
ShortcutSupportEnumerates values returned by several types.
SipAddressDataKindEnumerates values returned by several types and taken as a parameter of the ContactsContract+CommonDataKinds+SipAddress.GetTypeLabel, ContactsContract+CommonDataKinds+SipAddress.GetTypeLabelFormatted, and ContactsContract+CommonDataKinds+SipAddress.GetTypeLabelResource members.
SmsIntentResultEnumerates values returned by several types.
SmsMessageTypeEnumerates values returned by several types.
SmsStatusEnumerates values returned by several types.
StatusPresenceEnumerates values returned by several types and taken as a parameter of the ContactsContract+StatusUpdates.GetPresenceIconResourceId, and ContactsContract+StatusUpdates.GetPresencePrecedence members.
SyncStateContractThe ContentProvider contract for associating data with ana data array account.
SyncStateContract+Columns
SyncStateContract+ColumnsConsts
SyncStateContract+Constants
SyncStateContract+Constants+InterfaceConsts
SyncStateContract+Helpers
TelephonyThe Telephony provider contains data related to phone operation, specifically SMS and MMS messages and access to the APN list, including the MMSC to use.
Telephony+BaseMmsColumns
Telephony+BaseMmsColumnsConsts
Telephony+CanonicalAddressesColumns
Telephony+CanonicalAddressesColumnsConsts
Telephony+Carriers
Telephony+Carriers+InterfaceConsts
Telephony+Mms
Telephony+Mms+Addr
Telephony+Mms+Addr+InterfaceConsts
Telephony+Mms+Draft
Telephony+Mms+Draft+InterfaceConsts
Telephony+Mms+Inbox
Telephony+Mms+Inbox+InterfaceConsts
Telephony+Mms+Intents
Telephony+Mms+InterfaceConsts
Telephony+Mms+Outbox
Telephony+Mms+Outbox+InterfaceConsts
Telephony+Mms+Part
Telephony+Mms+Part+InterfaceConsts
Telephony+Mms+Rate
Telephony+Mms+Sent
Telephony+Mms+Sent+InterfaceConsts
Telephony+MmsSms
Telephony+MmsSms+InterfaceConsts
Telephony+MmsSms+PendingMessages
Telephony+MmsSms+PendingMessages+InterfaceConsts
Telephony+Sms
Telephony+Sms+Conversations
Telephony+Sms+Conversations+InterfaceConsts
Telephony+Sms+Draft
Telephony+Sms+Draft+InterfaceConsts
Telephony+Sms+Inbox
Telephony+Sms+Inbox+InterfaceConsts
Telephony+Sms+Intents
Telephony+Sms+InterfaceConsts
Telephony+Sms+Outbox
Telephony+Sms+Outbox+InterfaceConsts
Telephony+Sms+Sent
Telephony+Sms+Sent+InterfaceConsts
Telephony+TextBasedSmsColumns
Telephony+TextBasedSmsColumnsConsts
Telephony+Threads
Telephony+Threads+InterfaceConsts
Telephony+ThreadsColumns
Telephony+ThreadsColumnsConsts
ThreadTypeEnumerates values returned by several types.
ThumbnailKindEnumerates values returned by the ThumbnailKind.FullScreenKind, ThumbnailKind.MicroKind, and ThumbnailKind.MiniKind members and taken as a parameter of several types.
UserDictionaryA provider of user defined words for input methods to use for predictive text input.
UserDictionary+WordsContains the user defined words.
UserDictionary+Words+InterfaceConsts
VideoThumbnailKindEnumerates values returned by several types and taken as a parameter of the MediaStore+Video+Thumbnails.GetThumbnail, and MediaStore+Video+Thumbnails.GetThumbnail members.
VoicemailConfigurationStateEnumerates values returned by several types.
VoicemailContractThe contract between the voicemail provider and applications.
VoicemailContract+StatusDefines fields exposed through the /status path of this content provider.
VoicemailContract+Status+InterfaceConsts
VoicemailContract+VoicemailsDefines fields exposed through the /voicemail path of this content provider.
VoicemailContract+Voicemails+InterfaceConsts
VoicemailDataChannelStateEnumerates values returned by several types.
VoicemailNotificationChannelStateEnumerates values returned by several types.
WebsiteDataKindEnumerates values returned by several methods of WebsiteDataKind.
WifiSleepPolicyEnumerates values returned by several types.