Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/app/people/PeopleManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/people/PeopleManager#inhmethods)

# PeopleManager

*** ** * ** ***

` public final class PeopleManager `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.people.PeopleManager |

<br />

*** ** * ** ***

This class allows interaction with conversation and people data.   

Restricted for SDK Runtime environment in API level 34.

## Summary

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/app/people/PeopleManager#addOrUpdateStatus(java.lang.String,%20android.app.people.ConversationStatus)(https://developer.android.com/reference/java/lang/String conversationId, https://developer.android.com/reference/android/app/people/ConversationStatus status) ` Sets or updates a `https://developer.android.com/reference/android/app/people/ConversationStatus` for a conversation. |
| ` void` | ` https://developer.android.com/reference/android/app/people/PeopleManager#clearStatus(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String conversationId, https://developer.android.com/reference/java/lang/String statusId) ` Unpublishes a given status from the given conversation. |
| ` void` | ` https://developer.android.com/reference/android/app/people/PeopleManager#clearStatuses(java.lang.String)(https://developer.android.com/reference/java/lang/String conversationId) ` Removes all published statuses for the given conversation. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/people/ConversationStatus>` | ` https://developer.android.com/reference/android/app/people/PeopleManager#getStatuses(java.lang.String)(https://developer.android.com/reference/java/lang/String conversationId) ` Returns all of the currently published statuses for a given conversation. |

### 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*.

## Public methods

### addOrUpdateStatus

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

```
public void addOrUpdateStatus (String conversationId, 
                ConversationStatus status)
```

Sets or updates a `https://developer.android.com/reference/android/app/people/ConversationStatus` for a conversation.

Statuses are meant to represent current information about the conversation. Like notifications, they are transient and are not persisted beyond a reboot, nor are they backed up and restored.

If the provided conversation shortcut is not already pinned, or cached by the system, it will remain cached as long as the status is active.

<br />

<br />

| Parameters ||
|---|---|
| `conversationId` | `String`: the `https://developer.android.com/reference/android/content/pm/ShortcutInfo#getId()` of the shortcut backing the conversation that has an active status. This value cannot be `null`. <br /> |
| `status` | `ConversationStatus`: the current status for the given conversation. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `void` | whether the role is available in the system <br /> |

### clearStatus

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

```
public void clearStatus (String conversationId, 
                String statusId)
```

Unpublishes a given status from the given conversation.

<br />

| Parameters ||
|---|---|
| `conversationId` | `String`: the `https://developer.android.com/reference/android/content/pm/ShortcutInfo#getId()` of the shortcut backing the conversation that has an active status. This value cannot be `null`. <br /> |
| `statusId` | `String`: the `https://developer.android.com/reference/android/app/people/ConversationStatus#getId()` of a published status for the given conversation. This value cannot be `null`. <br /> |

### clearStatuses

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

```
public void clearStatuses (String conversationId)
```

Removes all published statuses for the given conversation.

<br />

| Parameters ||
|---|---|
| `conversationId` | `String`: the `https://developer.android.com/reference/android/content/pm/ShortcutInfo#getId()` of the shortcut backing the conversation that has one or more active statuses. This value cannot be `null`. <br /> |

### getStatuses

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

```
public List<ConversationStatus> getStatuses (String conversationId)
```

Returns all of the currently published statuses for a given conversation.

<br />

| Parameters ||
|---|---|
| `conversationId` | `String`: the `https://developer.android.com/reference/android/content/pm/ShortcutInfo#getId()` of the shortcut backing the conversation that has one or more active statuses. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/people/ConversationStatus>` | This value cannot be `null`. <br /> |