# Print output for @column tags ?> ContactsContract.RawContactsEntity - Android SDK | Android Developers

Most visited


Recently visited


ContactsContract.RawContactsEntity

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

java.lang.Object
   ↳ 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.

Summary


Constants

String CONTENT_TYPE

The MIME type of CONTENT_URI providing a directory of raw contact entities.

String DATA_ID

The ID of the data column.

Inherited constants

Fields

public static final Uri CONTENT_URI

The content:// style URI for this table

public static final Uri PROFILE_CONTENT_URI

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

Inherited methods

Constants


CONTENT_TYPE

public static final String CONTENT_TYPE

The MIME type of CONTENT_URI providing a directory of raw contact entities.

Constant Value: "vnd.android.cursor.dir/raw_contact_entity"

DATA_ID

public static final String DATA_ID

The ID of the data column. The value will be null if this raw contact has no data rows.

Type: INTEGER

Constant Value: "data_id"

Fields


CONTENT_URI

public static final Uri CONTENT_URI

The content:// style URI for this table

PROFILE_CONTENT_URI

public static final Uri PROFILE_CONTENT_URI

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

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.