ContactsPickerSessionContract.Session


public static final class ContactsPickerSessionContract.Session
extends Object implements BaseColumns

java.lang.Object
   ↳ android.provider.ContactsPickerSessionContract.Session


Defines the contract for a Contacts Picker session, which represents the set of contacts selected by the user in a single picking operation.

Each row in this table corresponds to a single picker session and acts as a pointer to the underlying contact data. Querying a session URI effectively projects rows from the ContactsContract.Data table, providing secure, one-time access to the ContactsPickerSessionContract.EXTRA_PICK_CONTACTS_REQUESTED_DATA_FIELDS for the contacts that the user selected.

Access to session data is strictly controlled for privacy and security. A client application can only access the session it initiated using the specific session URI returned by the picker. This access is enforced through Intent.FLAG_GRANT_READ_URI_PERMISSION. Privileged system applications with MANAGE_CONTACTS_PICKER_SESSION permission can still access all session data.

Because a session URI projects data from ContactsContract.Data, clients can use the columns from ContactsContract.Data in their query projection, selection, and sort order, just as they would when querying ContactsContract.Data directly.

Summary

Constants

String CONTENT_TYPE

The MIME type for a directory of contact data items within a specific session.

Inherited constants

Fields

public static final Uri CONTENT_URI

The base content:// style Uri for this table.

Inherited methods

Constants

CONTENT_TYPE

public static final String CONTENT_TYPE

The MIME type for a directory of contact data items within a specific session. A session URI, whether for a single session (e.g., CONTENT_URI/<session_id>) or for the base URI, will have this MIME type.

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

Fields

CONTENT_URI

public static final Uri CONTENT_URI

The base content:// style Uri for this table.

This URI represents the collection of all picker sessions and cannot be queried directly. To access data for a specific session, clients must use the unique session URI returned by the Contacts Picker in Activity.onActivityResult(int, int, android.content.Intent). This returned URI will have the format content://<AUTHORITY>/sessions/<session_id>, where <session_id> is a unique identifier for the picking operation.