Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/ContactsContract.Profile#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/ContactsContract.Profile#inhconstants) \| [Fields](https://developer.android.com/reference/android/provider/ContactsContract.Profile#lfields) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.Profile#inhmethods)

# ContactsContract.Profile

*** ** * ** ***

` public static final class ContactsContract.Profile `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/provider/BaseColumns, https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns, https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns, https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns, https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.Profile |

<br />

*** ** * ** ***

<br />

Constants for the user's profile data, which is represented as a single contact on the device that represents the user. The profile contact is not aggregated together automatically in the same way that normal contacts are; instead, each account (including data set, if applicable) on the device may contribute a single raw contact representing the user's personal profile data from that source.

Access to the profile entry through these URIs (or incidental access to parts of the profile if retrieved directly via ID) requires additional permissions beyond the read/write contact permissions required by the provider. Querying for profile data requires android.permission.READ_PROFILE permission, and inserting or updating profile data requires android.permission.WRITE_PROFILE permission.

### 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 `https://developer.android.com/reference/android/provider/ContactsContract.RawContactsColumns#CONTACT_ID` 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 `https://developer.android.com/reference/android/provider/ContactsContract.RawContactsColumns#CONTACT_ID` 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 `https://developer.android.com/reference/android/provider/ContactsContract.Profile#CONTENT_URI` 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.

<br />

## Summary

| ### Constants ||
|---|---|
| `long` | `https://developer.android.com/reference/android/provider/ContactsContract.Profile#MIN_ID` The minimum ID for any entity that belongs to the profile. |

### Inherited constants

From interface `https://developer.android.com/reference/android/provider/BaseColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_COUNT`

The count of rows in a directory.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_ID`

The unique ID for a row.
From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_ALTERNATIVE`

<br />

An alternative representation of the display name, such as "family name first" instead of "given name first" for Western names.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_PRIMARY`

<br />

The standard text shown as the contact's display name, based on the best available information for the contact (for example, it might be the email address if the name is not available).
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_SOURCE`

The kind of data that is used as the display name for the contact, such as structured name or email address.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME`

<br />

Pronunciation of the full name in the phonetic alphabet specified by `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME_STYLE`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME_STYLE`

The phonetic alphabet used to represent the `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#SORT_KEY_ALTERNATIVE`

Sort key based on the alternative representation of the full name, `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_ALTERNATIVE`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactNameColumns#SORT_KEY_PRIMARY`

Sort key that takes into account locale-based traditions for sorting names in address books.
From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#CUSTOM_RINGTONE`

URI for a custom ringtone associated with the contact.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#LAST_TIME_CONTACTED`

*This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`. This column always contains 0.*
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#PINNED`

The position at which the contact is pinned.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#SEND_TO_VOICEMAIL`

Whether the contact should always be sent to voicemail.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#STARRED`

Is the contact starred?

Type: INTEGER (boolean)

<br />

`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#TIMES_CONTACTED`

*This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`. This column always contains 0.*
From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_CHAT_CAPABILITY`

Contact Chat Capabilities.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_PRESENCE`

Contact presence status.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS`

Contact's latest status update.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_ICON`

The resource ID of the icon for the source of contact status.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_LABEL`

The resource ID of the label describing the source of contact status, e.g. "Google Talk".
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_RES_PACKAGE`

The package containing resources for this status: label and icon.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_TIMESTAMP`

The absolute time in milliseconds when the latest status was inserted/updated.
From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP`

Timestamp (milliseconds since epoch) of when this contact was last updated.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#DISPLAY_NAME`

The display name for the contact.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#HAS_PHONE_NUMBER`

An indicator of whether this contact has at least one phone number.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IN_DEFAULT_DIRECTORY`

Flag that reflects whether the contact exists inside the default directory.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IN_VISIBLE_GROUP`

Flag that reflects the `https://developer.android.com/reference/android/provider/ContactsContract.GroupsColumns#GROUP_VISIBLE` state of any `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.GroupMembership` for this contact.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IS_USER_PROFILE`

Flag that reflects whether this contact represents the user's personal profile entry.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#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.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#NAME_RAW_CONTACT_ID`

Reference to the row in the RawContacts table holding the contact name.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_FILE_ID`

Photo file ID of the full-size photo.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_ID`

Reference to the row in the data table holding the photo.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI`

A URI that can be used to retrieve a thumbnail of the contact's photo.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_URI`

A URI that can be used to retrieve the contact's full-size photo.

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.Profile#CONTENT_RAW_CONTACTS_URI` `https://developer.android.com/reference/android/net/Uri` for referencing the raw contacts that make up the user's profile `https://developer.android.com/reference/android/provider/ContactsContract.Contacts` entry. |
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.Profile#CONTENT_URI` The content:// style URI for this table, which requests the contact entry representing the user's personal profile data. |
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.Profile#CONTENT_VCARD_URI` `https://developer.android.com/reference/android/net/Uri` for referencing the user's profile `https://developer.android.com/reference/android/provider/ContactsContract.Contacts` entry, Provides `https://developer.android.com/reference/android/provider/OpenableColumns` columns when queried, or returns the user's profile contact formatted as a vCard when opened through `https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String)`. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### MIN_ID

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final long MIN_ID
```

The minimum ID for any entity that belongs to the profile. This essentially defines an ID-space in which profile data is stored, and is used by the provider to determine whether a request via a non-profile-specific URI should be directed to the profile data rather than general contacts data, along with all the special permission checks that entails. Callers may use `https://developer.android.com/reference/android/provider/ContactsContract#isProfileId(long)` to check whether a specific ID falls into the set of data intended for the profile.

<br />

Constant Value: 9223372034707292160 (0x7fffffff80000000)

## Fields

### CONTENT_RAW_CONTACTS_URI

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_RAW_CONTACTS_URI
```

`https://developer.android.com/reference/android/net/Uri` for referencing the raw contacts that make up the user's profile `https://developer.android.com/reference/android/provider/ContactsContract.Contacts` entry. An individual raw contact entry within the profile can be addressed by appending the raw contact ID. The entities or data within that specific raw contact can be requested by appending the entity or data path as well.

<br />

### CONTENT_URI

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_URI
```

The content:// style URI for this table, which requests the contact entry representing the user's personal profile data.

<br />

### CONTENT_VCARD_URI

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_VCARD_URI
```

`https://developer.android.com/reference/android/net/Uri` for referencing the user's profile `https://developer.android.com/reference/android/provider/ContactsContract.Contacts` entry, Provides `https://developer.android.com/reference/android/provider/OpenableColumns` columns when queried, or returns the user's profile contact formatted as a vCard when opened through `https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String)`.

<br />