# ParticipantExtension

Artifact: [androidx.core:core-telecom](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/telecom/extensions/ParticipantExtension.kt+class:androidx.core.telecom.extensions.ParticipantExtension) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
interface ParticipantExtension
```

<br />

*** ** * ** ***

The extension interface used to support notifying remote surfaces (automotive, watch, etc...) of state related to the `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s in the call.

This interface allows an application to notify remote surfaces of changes to `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant` state. Additionally, this interface allows the application to support optional actions that use the participant state. These actions provide remote surfaces with the ability to request participant state updates based on user input and provide additional information about the state of specific participants.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ExtensionInitializationScope#addParticipantExtension(kotlin.collections.List,androidx.core.telecom.extensions.Participant)` |   |

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtension#addKickParticipantSupport(kotlin.coroutines.SuspendFunction1)( onKickParticipant: suspend (https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds support for allowing the user to kick participants in the call using the remote surface. |
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/RaiseHandState` | `@https://developer.android.com/reference/kotlin/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtension#addRaiseHandSupport(kotlin.collections.List,kotlin.coroutines.SuspendFunction1)( initialRaisedHands: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant>, onHandRaisedChanged: suspend (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds support for notifying remote surfaces of the "raised hand" state of all `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s in the call. |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtension#updateActiveParticipant(androidx.core.telecom.extensions.Participant)(participant: https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant?)` Update all of the remote surfaces that the active participant associated with this call has changed, if it exists. |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtension#updateParticipants(kotlin.collections.List)(newParticipants: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant>)` Update all of the remote surfaces that the `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s of this call have changed. |

## Public functions

### addKickParticipantSupport

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
@ExperimentalAppActions
fun addKickParticipantSupport(
    onKickParticipant: suspend (Participant) -> Unit
): Unit
```

Adds support for allowing the user to kick participants in the call using the remote surface.

| Parameters |
|---|---|
| `onKickParticipant: suspend (https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The action to perform when the user requests to kick a participant. This operation should not return until the request has been processed. |

### addRaiseHandSupport

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
@ExperimentalAppActions
fun addRaiseHandSupport(
    initialRaisedHands: List<Participant> = emptyList(),
    onHandRaisedChanged: suspend (Boolean) -> Unit
): RaiseHandState
```

Adds support for notifying remote surfaces of the "raised hand" state of all `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s in the call.

| Parameters |
|---|---|
| `initialRaisedHands: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant> = emptyList()` | The initial List of `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s whose hands are raised, ordered from earliest raised hand to newest raised hand. |
| `onHandRaisedChanged: suspend (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | This is called when the user has requested to change their "raised hand" state on a remote surface. If `true`, this user has raised their hand. If `false`, this user has lowered their hand. This operation should not return until the request has been processed. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/RaiseHandState` | The interface used to update the current raised hand state of all `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s in the call. |

### updateActiveParticipant

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
suspend fun updateActiveParticipant(participant: Participant?): Unit
```

Update all of the remote surfaces that the active participant associated with this call has changed, if it exists.

The "active" participant is the participant that is currently taking focus and should be marked in UX as active or take a more prominent view to the user.

| Parameters |
|---|---|
| `participant: https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant?` | the `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant` that is marked as the active participant or `null` if there is no active participant |

### updateParticipants

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
suspend fun updateParticipants(newParticipants: List<Participant>): Unit
```

Update all of the remote surfaces that the `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s of this call have changed. Participants are displayed on the remote screen according to their order within the participants list, starting with the first element. Duplicate participants are removed. If the same participant is added to the list more than once, **only the first occurrence of that participant** will be retained in the list; subsequent duplicates are dropped.

| Parameters |
|---|---|
| `newParticipants: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant>` | The new set of `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s associated with this call. |