# 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)

*** ** * ** ***


```
public 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/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/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/androidx/core/telecom/extensions/ExtensionInitializationScope#addParticipantExtension(kotlin.collections.List,androidx.core.telecom.extensions.Participant)` |   |

## Summary

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

## Public methods

### addKickParticipantSupport

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

```
@ExperimentalAppActions
abstract void addKickParticipantSupport(
    @NonNull SuspendFunction1<@NonNull Participant, Unit> onKickParticipant
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull SuspendFunction1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/Participant, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onKickParticipant` | 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
abstract @NonNull RaiseHandState addRaiseHandSupport(
    @NonNull List<@NonNull Participant> initialRaisedHands,
    @NonNull SuspendFunction1<@NonNull Boolean, Unit> onHandRaisedChanged
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/Participant> initialRaisedHands` | The initial List of `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s whose hands are raised, ordered from earliest raised hand to newest raised hand. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull SuspendFunction1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onHandRaisedChanged` | 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/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/RaiseHandState` | The interface used to update the current raised hand state of all `https://developer.android.com/reference/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)

```
abstract void updateActiveParticipant(Participant participant)
```

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 |
|---|---|
| `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant participant` | the `https://developer.android.com/reference/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)

```
abstract void updateParticipants(@NonNull List<@NonNull Participant> newParticipants)
```

Update all of the remote surfaces that the `https://developer.android.com/reference/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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/Participant> newParticipants` | The new set of `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s associated with this call. |