PeopleContract.Persons


public static final class PeopleContract.Persons
extends Object

java.lang.Object
   ↳ android.provider.PeopleContract.Persons


Constants, URI definitions, and query utilities for person identity records aggregated from People Directories.

For client applications: Clients query CONTENT_URI using structured query arguments created via Query.Builder. Each row in the resulting Cursor represents a person record supplied by a specific directory, including standard columns such as LOOKUP_KEY, DISPLAY_NAME, PHOTO_URI, and CAPABILITY, as well as directory metadata from Directory.DIRECTORY_AUTHORITY and Directory.PACKAGE_NAME.

To ensure accurate and fresh data, see PeopleContract.EXTRA_NOTIFICATION_URI.

For People Directory applications: When the system queries a People Directory application for person records, it expects cursors returned by the directory to populate these standard column names, as well as PeopleContract.QUERY_ARG_SELECTION_TYPE and PeopleContract.QUERY_ARG_SELECTION_VALUE indicating the exact selection criterion that matched each row.

Summary

Nested classes

class PeopleContract.Persons.Query

Constants and builder utilities for constructing person query argument bundles. 

Constants

String CAPABILITY

Column name for a bitmask representing the communication modes supported by this person, composed of flags from Capability.

String CONTENT_ITEM_TYPE

The MIME type of a CONTENT_URI subdirectory of a single person record.

String CONTENT_TYPE

The MIME type of CONTENT_URI providing a directory of person records.

String DISPLAY_NAME

Column name for the primary display name of the person.

String IS_KNOWN

Indicates whether the person is a known contact or connection in the People Directory application's system.

String LOOKUP_KEY

Column name for an opaque, stable string key that uniquely identifies this person record within its originating People Directory.

String PHOTO_URI

Column name for a content URI pointing to the person's photo or avatar image.

Fields

public static final Uri CONTENT_LOOKUP_URI

The content:// style base URI for persistently referencing a person record by its lookup key.

public static final Uri CONTENT_URI

The content:// style URI for querying person records aggregated from People Directories.

Inherited methods

Constants

CAPABILITY

Added in API level 10000
public static final String CAPABILITY

Column name for a bitmask representing the communication modes supported by this person, composed of flags from Capability.

Type: INTEGER

Constant Value: "capability"

CONTENT_ITEM_TYPE

Added in API level 10000
public static final String CONTENT_ITEM_TYPE

The MIME type of a CONTENT_URI subdirectory of a single person record.

Constant Value: "vnd.android.cursor.item/people_person"

CONTENT_TYPE

Added in API level 10000
public static final String CONTENT_TYPE

The MIME type of CONTENT_URI providing a directory of person records.

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

DISPLAY_NAME

Added in API level 10000
public static final String DISPLAY_NAME

Column name for the primary display name of the person.

Type: TEXT

Constant Value: "display_name"

IS_KNOWN

Added in API level 10000
public static final String IS_KNOWN

Indicates whether the person is a known contact or connection in the People Directory application's system.

If a People Directory does not return this, it should be treated as false by default.

TYPE: INTEGER (boolean) (Optional)

Constant Value: "is_known"

LOOKUP_KEY

Added in API level 10000
public static final String LOOKUP_KEY

Column name for an opaque, stable string key that uniquely identifies this person record within its originating People Directory.

Type: TEXT

Constant Value: "lookup_key"

PHOTO_URI

Added in API level 10000
public static final String PHOTO_URI

Column name for a content URI pointing to the person's photo or avatar image.

People Directory applications are responsible for hosting the photo content URIs. The Android system do not guarantee the access to the URI.

Type: TEXT

Constant Value: "photo_uri"

Fields

CONTENT_LOOKUP_URI

Added in API level 10000
public static final Uri CONTENT_LOOKUP_URI

The content:// style base URI for persistently referencing a person record by its lookup key.

To construct a stable reference to a person identity in storages like call log entries, or notification attributions, append the person's LOOKUP_KEY to this URI along with the originating directory's Directory.PACKAGE_NAME as a query parameter using Uri.Builder. For example, if a person's lookup key is "foo" and the directory's package name is "com.example.app", then the persistent reference would be content://com.android.people/persons/lookup/foo?package_name=com.example.app.

Note: This URI is intended exclusively for persistent identification and referencing across system components. Direct queries against this URI on the People Provider are unsupported; to resolve a person by lookup key, client applications must query CONTENT_URI using Query.Builder.addLookupQuery(String,List).

CONTENT_URI

Added in API level 10000
public static final Uri CONTENT_URI

The content:// style URI for querying person records aggregated from People Directories.

Queries against this URI must be executed via ContentResolver.query(Uri,String[],Bundle,CancellationSignal) using structured query arguments constructed with Query.Builder. Traditional SQL selection strings are not supported.