Added in API level 5

RawContactsEntity


class RawContactsEntity : BaseColumns, ContactsContract.DataColumns, ContactsContract.RawContactsColumns
kotlin.Any
   ↳ android.provider.ContactsContract.RawContactsEntity

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.
RawContacts
long _ID read-only Raw contact row ID. See RawContacts.
long CONTACT_ID read-only See RawContacts.
int AGGREGATION_MODE read-only See RawContacts.
int DELETED read-only See 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
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
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

Added in API level 5
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

Added in API level 5
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

Added in API level 5
static val CONTENT_URI: Uri!

The content:// style URI for this table

PROFILE_CONTENT_URI

Added in API level 14
static val PROFILE_CONTENT_URI: Uri!

The content:// style URI for this table, specific to the user's profile.