Added in API level 31

PeopleManager

public final class PeopleManager
extends Object

java.lang.Object
   ↳ android.app.people.PeopleManager


This class allows interaction with conversation and people data.

Summary

Public methods

void addOrUpdateStatus(String conversationId, ConversationStatus status)

Sets or updates a ConversationStatus for a conversation.

void clearStatus(String conversationId, String statusId)

Unpublishes a given status from the given conversation.

void clearStatuses(String conversationId)

Removes all published statuses for the given conversation.

List<ConversationStatus> getStatuses(String conversationId)

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

Inherited methods

Public methods

addOrUpdateStatus

Added in API level 31
public void addOrUpdateStatus (String conversationId, 
                ConversationStatus status)

Sets or updates a 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.

Parameters
conversationId String: the id of the shortcut backing the conversation that has an active status This value cannot be null.

status ConversationStatus: the current status for the given conversation This value cannot be null.

Returns
void whether the role is available in the system

clearStatus

Added in API level 31
public void clearStatus (String conversationId, 
                String statusId)

Unpublishes a given status from the given conversation.

Parameters
conversationId String: the id of the shortcut backing the conversation that has an active status This value cannot be null.

statusId String: the id of a published status for the given conversation This value cannot be null.

clearStatuses

Added in API level 31
public void clearStatuses (String conversationId)

Removes all published statuses for the given conversation.

Parameters
conversationId String: the id of the shortcut backing the conversation that has one or more active statuses This value cannot be null.

getStatuses

Added in API level 31
public List<ConversationStatus> getStatuses (String conversationId)

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

Parameters
conversationId String: the id of the shortcut backing the conversation that has one or more active statuses This value cannot be null.

Returns
List<ConversationStatus> This value cannot be null.