public static final class ContactsContract.Profile extends Object implements BaseColumns, ContactsContract.ContactsColumns, ContactsContract.ContactOptionsColumns, ContactsContract.ContactNameColumns, ContactsContract.ContactStatusColumns
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.
ContactsContract.RawContactsColumns.CONTACT_IDcolumn 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.CONTACT_IDcolumn of the newly inserted raw contact.
CONTENT_URIfor 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.
|Modifier and Type||Field and Description|
The content:// style URI for this table, which requests the contact entry representing the user's personal profile data.
The minimum ID for any entity that belongs to the profile.
DISPLAY_NAME, HAS_PHONE_NUMBER, IN_VISIBLE_GROUP, IS_USER_PROFILE, LOOKUP_KEY, NAME_RAW_CONTACT_ID, PHOTO_FILE_ID, PHOTO_ID, PHOTO_THUMBNAIL_URI, PHOTO_URI
CUSTOM_RINGTONE, LAST_TIME_CONTACTED, SEND_TO_VOICEMAIL, STARRED, TIMES_CONTACTED
DISPLAY_NAME_ALTERNATIVE, DISPLAY_NAME_PRIMARY, DISPLAY_NAME_SOURCE, PHONETIC_NAME, PHONETIC_NAME_STYLE, SORT_KEY_ALTERNATIVE, SORT_KEY_PRIMARY
public static final Uri CONTENT_URI
public static final Uri CONTENT_VCARD_URI
Urifor referencing the user's profile
OpenableColumnscolumns when queried, or returns the user's profile contact formatted as a vCard when opened through
public static final Uri CONTENT_RAW_CONTACTS_URI
Urifor referencing the raw contacts that make up the user's profile
Contactsentry. 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.
public static final long MIN_ID
ContactsContract.isProfileId(long)to check whether a specific ID falls into the set of data intended for the profile.