Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#inhconstants) \| [Fields](https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#lfields) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#inhmethods)

# ContactsPickerSessionContract.Session

*** ** * ** ***

` public static final class ContactsPickerSessionContract.Session `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/provider/BaseColumns `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsPickerSessionContract.Session |

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/android/provider/ContactsContract.Data` table, providing secure, one-time access to the `https://developer.android.com/reference/android/provider/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 `https://developer.android.com/reference/android/content/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 `https://developer.android.com/reference/android/provider/ContactsContract.Data`, clients can use the columns from `https://developer.android.com/reference/android/provider/ContactsContract.Data` in their query projection and sort order, just as they would when querying `https://developer.android.com/reference/android/provider/ContactsContract.Data` directly.

Clients are not expected to pass selection and selection arguments in this query, as the data is already selected by the human user. Throws `https://developer.android.com/reference/java/lang/UnsupportedOperationException` when either selection or selection arguments are passed.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#CONTENT_TYPE` The MIME type for a directory of contact data items within a specific session. |

### Inherited constants

From interface `https://developer.android.com/reference/android/provider/BaseColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_COUNT`

The count of rows in a directory.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_ID`

The unique ID for a row.

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsPickerSessionContract.Session#CONTENT_URI` The base `content://` style `https://developer.android.com/reference/android/net/Uri` for this table. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### CONTENT_TYPE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

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

## Fields

### CONTENT_URI

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_URI
```

The base `content://` style `https://developer.android.com/reference/android/net/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 `https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.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.

<br />