Persons
class Persons
| kotlin.Any | |
| ↳ | 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 android.database.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 | |
|---|---|
|
Constants and builder utilities for constructing person query argument bundles. |
|
| Constants | |
|---|---|
| static String |
Column name for a bitmask representing the communication modes supported by this person, composed of flags from |
| static String |
The MIME type of a |
| static String |
The MIME type of |
| static String |
Column name for the primary display name of the person. |
| static String |
Indicates whether the person is a known contact or connection in the People Directory application's system. |
| static String |
Column name for an opaque, stable string key that uniquely identifies this person record within its originating People Directory. |
| static String |
Column name for a URI pointing to the person's photo or avatar image. |
| Properties | |
|---|---|
| static Uri |
The content:// style base URI for persistently referencing a person record by its lookup key. |
| static Uri |
The content:// style URI for querying person records aggregated from People Directories. |
Constants
CAPABILITY
static val CAPABILITY: String
Column name for a bitmask representing the communication modes supported by this person, composed of flags from Capability.
Type: INTEGER
Value: "capability"CONTENT_ITEM_TYPE
static val CONTENT_ITEM_TYPE: String
The MIME type of a CONTENT_URI subdirectory of a single person record.
Value: "vnd.android.cursor.item/people_person"CONTENT_TYPE
static val CONTENT_TYPE: String
The MIME type of CONTENT_URI providing a directory of person records.
Value: "vnd.android.cursor.dir/people_persons"DISPLAY_NAME
static val DISPLAY_NAME: String
Column name for the primary display name of the person.
Type: TEXT
Value: "display_name"IS_KNOWN
static val IS_KNOWN: String
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)
Value: "is_known"LOOKUP_KEY
static val LOOKUP_KEY: String
Column name for an opaque, stable string key that uniquely identifies this person record within its originating People Directory.
Type: TEXT
Value: "lookup_key"PHOTO_URI
static val PHOTO_URI: String
Column name for a URI pointing to the person's photo or avatar image.
People Directory applications are responsible for hosting photo URIs. Due to performance reasons, using content:// URIs is not allowed; standard web URLs (such as https://) are strongly recommended instead. The Android system does not guarantee access to content:// URIs.
Type: TEXT
Value: "photo_uri"Properties
CONTENT_LOOKUP_URI
static val CONTENT_LOOKUP_URI: 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, append the person's LOOKUP_KEY to this URI using Uri.Builder or Uri.withAppendedPath(Uri,String). For example, if a person's lookup key is "foo", then the persistent reference would be content://com.android.people/persons/lookup/foo.
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
static val CONTENT_URI: 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.