Added in API level 31

PeopleManager


class PeopleManager
kotlin.Any
   ↳ android.app.people.PeopleManager

This class allows interaction with conversation and people data.

Summary

Public methods
Unit
addOrUpdateStatus(conversationId: String, status: ConversationStatus)

Sets or updates a ConversationStatus for a conversation.

Unit
clearStatus(conversationId: String, statusId: String)

Unpublishes a given status from the given conversation.

Unit
clearStatuses(conversationId: String)

Removes all published statuses for the given conversation.

MutableList<ConversationStatus!>
getStatuses(conversationId: String)

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

Public methods

addOrUpdateStatus

Added in API level 31
fun addOrUpdateStatus(
    conversationId: String,
    status: ConversationStatus
): Unit

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.
Return
Unit whether the role is available in the system

clearStatus

Added in API level 31
fun clearStatus(
    conversationId: String,
    statusId: String
): Unit

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
fun clearStatuses(conversationId: String): Unit

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
fun getStatuses(conversationId: String): MutableList<ConversationStatus!>

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.
Return
MutableList<ConversationStatus!> This value cannot be null.