class RawContactsEntity : BaseColumns, ContactsContract.DataColumns, ContactsContract.RawContactsColumns
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. It is a strictly read-only table.
If a raw contact has data rows, the RawContactsEntity cursor will contain a one row for each data row. If the raw contact has no data rows, the cursor will still contain one row with the raw contact-level information and nulls for data columns.
Uri entityUri = ContentUris.withAppendedId(RawContactsEntity.CONTENT_URI, rawContactId);
Cursor c = getContentResolver().query(entityUri,
new String[]{
RawContactsEntity.SOURCE_ID,
RawContactsEntity.DATA_ID,
RawContactsEntity.MIMETYPE,
RawContactsEntity.DATA1
}, null, null, null);
try {
while (c.moveToNext()) {
String sourceId = c.getString(0);
if (!c.isNull(1)) {
String mimeType = c.getString(2);
String data = c.getString(3);
...
}
}
} finally {
c.close();
}
Columns
RawContactsEntity has a combination of RawContact and Data columns.
Summary
Constants |
static String |
The MIME type of CONTENT_URI providing a directory of raw contact entities.
|
static String |
The ID of the data column.
|
Inherited constants |
From class RawContactsColumns
String |
ACCOUNT_TYPE_AND_DATA_SET
A concatenation of the account type and data set (delimited by a forward slash) - if the data set is empty, this will be the same as the account type. For applications that need to be aware of the data set, this can be used instead of account type to distinguish sets of data. This is never intended to be used for specifying accounts.
This column does *not* escape forward slashes in the account type or the data set. If this is an issue, consider using ContactsContract.RawContacts#ACCOUNT_TYPE and ContactsContract.RawContacts#DATA_SET directly.
|
String |
AGGREGATION_MODE
The aggregation mode for this contact.
Type: INTEGER
|
String |
BACKUP_ID
Persistent unique id for each raw_contact within its account. This id is provided by its own data source, and can be used to backup metadata to the server. This should be unique within each set of account_name/account_type/data_set
|
String |
CONTACT_ID
A reference to the ContactsContract.Contacts#_ID that this data belongs to.
Type: INTEGER
|
String |
DATA_SET
The data set within the account that this row belongs to. This allows multiple sync adapters for the same account type to distinguish between each others' data. This is empty by default, and is completely optional. It only needs to be populated if multiple sync adapters are entering distinct data for the same account type and account name.
Type: TEXT
|
String |
DELETED
The "deleted" flag: "0" by default, "1" if the row has been marked for deletion. When android.content.ContentResolver#delete is called on a raw contact, it is marked for deletion and removed from its aggregate contact. The sync adaptor deletes the raw contact on the server and then calls ContactResolver.delete once more, this time passing the ContactsContract#CALLER_IS_SYNCADAPTER query parameter to finalize the data removal.
Type: INTEGER
|
String |
METADATA_DIRTY
Flag indicating that a raw contact's metadata has changed, and its metadata needs to be synchronized by the server.
Type: INTEGER (boolean)
|
String |
RAW_CONTACT_IS_READ_ONLY
The "read-only" flag: "0" by default, "1" if the row cannot be modified or deleted except by a sync adapter. See ContactsContract#CALLER_IS_SYNCADAPTER .
Type: INTEGER
|
String |
RAW_CONTACT_IS_USER_PROFILE
Flag that reflects whether this raw contact belongs to the user's personal profile entry.
|
|
From class DataColumns
String |
CARRIER_PRESENCE
Carrier presence information.
Type: INTEGER (A bitmask of CARRIER_PRESENCE_* fields)
|
Int |
CARRIER_PRESENCE_VT_CAPABLE
Indicates that the entry is Video Telephony (VT) capable on the current carrier. An allowed bitmask of CARRIER_PRESENCE .
|
String |
DATA1
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA10
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA11
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA12
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA13
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA14
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA15
Generic data column, the meaning is MIMETYPE specific. By convention, this field is used to store BLOBs (binary data).
|
String |
DATA2
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA3
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA4
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA5
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA6
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA7
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA8
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA9
Generic data column, the meaning is MIMETYPE specific
|
String |
DATA_VERSION
The version of this data record. This is a read-only value. The data column is guaranteed to not change without the version going up. This value is monotonically increasing.
Type: INTEGER
|
String |
IS_PRIMARY
Whether this is the primary entry of its kind for the raw contact it belongs to.
Type: INTEGER (if set, non-0 means true)
|
String |
IS_READ_ONLY
The "read-only" flag: "0" by default, "1" if the row cannot be modified or deleted except by a sync adapter. See ContactsContract#CALLER_IS_SYNCADAPTER .
Type: INTEGER
|
String |
IS_SUPER_PRIMARY
Whether this is the primary entry of its kind for the aggregate contact it belongs to. Any data record that is "super primary" must also be "primary".
Type: INTEGER (if set, non-0 means true)
|
String |
MIMETYPE
The MIME type of the item represented by this row.
|
String |
PREFERRED_PHONE_ACCOUNT_COMPONENT_NAME
The flattened android.content.ComponentName of a that is the preferred PhoneAccountHandle to call the contact with.
On a multi-SIM device this field can be used in a CommonDataKinds.Phone row to indicate the PhoneAccountHandle to call the number with, instead of using android.telecom.TelecomManager#getDefaultOutgoingPhoneAccount(String) or asking every time.
android.telecom.TelecomManager#placeCall(Uri, android.os.Bundle) should be called with android.telecom.TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE set to the PhoneAccountHandle using the ComponentName from this field.
|
String |
PREFERRED_PHONE_ACCOUNT_ID
The ID of a that is the preferred PhoneAccountHandle to call the contact with. Used by CommonDataKinds.Phone .
On a multi-SIM device this field can be used in a CommonDataKinds.Phone row to indicate the PhoneAccountHandle to call the number with, instead of using android.telecom.TelecomManager#getDefaultOutgoingPhoneAccount(String) or asking every time.
android.telecom.TelecomManager#placeCall(Uri, android.os.Bundle) should be called with android.telecom.TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE set to the PhoneAccountHandle using the id from this field.
|
String |
RAW_CONTACT_ID
A reference to the RawContacts#_ID that this data belongs to.
|
String |
RES_PACKAGE
The package name to use when creating Resources objects for this data row. This value is only designed for use when building user interfaces, and should not be used to infer the owner.
|
String |
SYNC1
Generic column for use by sync adapters.
|
String |
SYNC2
Generic column for use by sync adapters.
|
String |
SYNC3
Generic column for use by sync adapters.
|
String |
SYNC4
Generic column for use by sync adapters.
|
|
|
Properties |
static Uri! |
The content:// style URI for this table
|
static Uri! |
The content:// style URI for this table, specific to the user's profile.
|
Constants
CONTENT_TYPE
static val CONTENT_TYPE: String
The MIME type of CONTENT_URI
providing a directory of raw contact entities.
Value: "vnd.android.cursor.dir/raw_contact_entity"
DATA_ID
static val DATA_ID: String
The ID of the data column. The value will be null if this raw contact has no data rows.
Type: INTEGER
Value: "data_id"
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
The content:// style URI for this table
PROFILE_CONTENT_URI
static val PROFILE_CONTENT_URI: Uri!
The content:// style URI for this table, specific to the user's profile.