Most visited

Recently visited

Added in API level 5

ContactsContract.RawContactsEntity

public static final class ContactsContract.RawContactsEntity
extends Object implements BaseColumns, ContactsContract.DataColumns, ContactsContract.RawContactsColumns

java.lang.Object
   ↳ android.provider.ContactsContract.RawContactsEntity


原始联系人实体表的常量,可以将其视为raw_contacts表与数据表的外部联接。 它是一个严格只读表格。

如果原始联系人具有数据行,则RawContactsEntity光标将为每个数据行包含一行。 如果原始联系人没有数据行,则光标将仍然包含一行包含原始联系人级别的信息,并为数据列包含空值。

 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.
RawContacts
long _ID read-only Raw contact row ID. See ContactsContract.RawContacts.
long CONTACT_ID read-only See ContactsContract.RawContacts.
int AGGREGATION_MODE read-only See ContactsContract.RawContacts.
int DELETED read-only See ContactsContract.RawContacts.
Data
long DATA_ID read-only Data row ID. It will be null if the raw contact has no data rows.
String MIMETYPE read-only See ContactsContract.Data.
int IS_PRIMARY read-only See ContactsContract.Data.
int IS_SUPER_PRIMARY read-only See ContactsContract.Data.
int DATA_VERSION read-only See ContactsContract.Data.
Any type DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
DATA9
DATA10
DATA11
DATA12
DATA13
DATA14
DATA15
read-only See ContactsContract.Data.
Any type SYNC1
SYNC2
SYNC3
SYNC4
read-only See ContactsContract.Data.

Summary

Constants

String CONTENT_TYPE

提供原始联系人实体目录的MIME类型 CONTENT_URI

String DATA_ID

数据列的ID。

Inherited constants

From interface android.provider.BaseColumns
From interface android.provider.ContactsContract.DataColumns
From interface android.provider.ContactsContract.RawContactsColumns

Fields

public static final Uri CONTENT_URI

该表格的内容://样式URI

public static final Uri PROFILE_CONTENT_URI

内容://表格的特定于用户个人资料的样式URI。

Inherited methods

From class java.lang.Object

Constants

CONTENT_TYPE

Added in API level 5
String CONTENT_TYPE

提供原始联系人实体目录的MIME类型 CONTENT_URI

常量值:“vnd.android.cursor.dir / raw_contact_entity”

DATA_ID

Added in API level 5
String DATA_ID

数据列的ID。 如果此原始联系人没有数据行,则此值为空。

Type: INTEGER

常量值:“data_id”

Fields

CONTENT_URI

Added in API level 5
Uri CONTENT_URI

该表格的内容://样式URI

PROFILE_CONTENT_URI

Added in API level 14
Uri PROFILE_CONTENT_URI

内容://表格的特定于用户个人资料的样式URI。

Hooray!