public static final class ContactsContract.RawContactsEntity extends Object implements 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(); }
RawContacts | |||
---|---|---|---|
long | BaseColumns._ID |
read-only | Raw contact row ID. See ContactsContract.RawContacts . |
long | ContactsContract.RawContactsColumns.CONTACT_ID |
read-only | See ContactsContract.RawContacts . |
int | ContactsContract.RawContactsColumns.AGGREGATION_MODE |
read-only | See ContactsContract.RawContacts . |
int | ContactsContract.RawContactsColumns.DELETED |
read-only | See ContactsContract.RawContacts . |
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE
The MIME type of
CONTENT_URI providing a directory of raw contact entities. |
static Uri |
CONTENT_URI
The content:// style URI for this table
|
static String |
DATA_ID
The ID of the data column.
|
static String |
FOR_EXPORT_ONLY
If
FOR_EXPORT_ONLY is explicitly set to "1", returned Cursor toward
Data.CONTENT_URI contains only exportable data. |
static Uri |
PROFILE_CONTENT_URI
The content:// style URI for this table, specific to the user's profile.
|
_COUNT, _ID
DATA_VERSION, DATA1, DATA10, DATA11, DATA12, DATA13, DATA14, DATA15, DATA2, DATA3, DATA4, DATA5, DATA6, DATA7, DATA8, DATA9, IS_PRIMARY, IS_READ_ONLY, IS_SUPER_PRIMARY, MIMETYPE, RAW_CONTACT_ID, RES_PACKAGE, SYNC1, SYNC2, SYNC3, SYNC4
ACCOUNT_TYPE_AND_DATA_SET, AGGREGATION_MODE, CONTACT_ID, DATA_SET, DELETED, NAME_VERIFIED, RAW_CONTACT_IS_READ_ONLY, RAW_CONTACT_IS_USER_PROFILE
public static final Uri CONTENT_URI
public static final Uri PROFILE_CONTENT_URI
public static final String CONTENT_TYPE
CONTENT_URI
providing a directory of raw contact entities.public static final String FOR_EXPORT_ONLY
FOR_EXPORT_ONLY
is explicitly set to "1", returned Cursor toward
Data.CONTENT_URI contains only exportable data.
This flag is useful (currently) only for vCard exporter in Contacts app, which
needs to exclude "un-exportable" data from available data to export, while
Contacts app itself has priviledge to access all data including "un-expotable"
ones and providers return all of them regardless of the callers' intention.
Type: INTEGER
public static final String DATA_ID
Type: INTEGER