# ParticipantExtensionRemote

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/ParticipantExtensionRemote.kt+class:androidx.core.telecom.extensions.ParticipantExtensionRemote) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
public interface ParticipantExtensionRemote
```

<br />

*** ** * ** ***

Interface used to allow the remote surface (automotive, watch, etc...) to know if the connected calling application supports the participant extension and optionally set up additional actions for the `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s in the call.

Actions allow the remote surface to display additional optional state regarding the `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s in the call and send action requests to the calling application to modify the state of supported actions.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/KickParticipantAction` | `@https://developer.android.com/reference/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/androidx/core/telecom/extensions/ParticipantExtensionRemote#addKickParticipantAction()()` Adds the ability for the user to request to kick `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s in the call. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/RaiseHandAction` | `@https://developer.android.com/reference/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/androidx/core/telecom/extensions/ParticipantExtensionRemote#addRaiseHandAction(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/java/util/List.html<@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> onRaisedHandsChanged )` Adds the "raise hand" action and provides the remote surface with the ability to display which `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s have their hands raised and an action to request to raise and lower their own hand. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/core/telecom/extensions/ParticipantExtensionRemote#isSupported()()` Whether or not the participants extension is supported by the calling application. |

## Public methods

### addKickParticipantAction

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

```
@ExperimentalAppActions
abstract @NonNull KickParticipantAction addKickParticipantAction()
```

Adds the ability for the user to request to kick `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s in the call.

```
connectExtensions(call) {
    val participantExtension = addParticipantExtension(
        // consume participant changed events
    )
    val kickParticipantAction = participantExtension.addKickParticipantAction()

    onConnected {
        // extensions have been negotiated and actions are ready to be used
        ...
        // kick a participant
        val kickResult = kickParticipantAction.kickParticipant(participant)
    }
}
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/KickParticipantAction` | The action that is used to send kick Participant event requests to the remote Call. |

### addRaiseHandAction

```
@ExperimentalAppActions
abstract @NonNull RaiseHandAction addRaiseHandAction(
    @NonNull SuspendFunction1<@NonNull List<@NonNull Participant>, Unit> onRaisedHandsChanged
)
```

Adds the "raise hand" action and provides the remote surface with the ability to display which `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s have their hands raised and an action to request to raise and lower their own hand.

```
connectExtensions(call) {
    val participantExtension = addParticipantExtension(
        // consume participant changed events
    )
    // Initialize the raise hand action
    val raiseHandAction = participantExtension.addRaiseHandAction { raisedHands ->
        // consume changes of participants with their hands raised
    }
    onConnected {
        // extensions have been negotiated and actions are ready to be used
        ...
        // notify the remote that this user has changed their hand raised state
        val raisedHandResult = raiseHandAction.setRaisedHandState(userHandRaisedState)
    }
}
```

Note: Must be called during initialization before `https://developer.android.com/reference/androidx/core/telecom/extensions/CallExtensionScope#onConnected(kotlin.coroutines.SuspendFunction1)` is called.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onRaisedHandsChanged` | Called when the List of `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s with their hands raised has changed, ordered from oldest raised hand to newest raised hand. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/extensions/RaiseHandAction` | The action that is used to determine support of this action and send raise hand event requests to the calling application. |

### isSupported

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

```
abstract boolean isSupported()
```

Whether or not the participants extension is supported by the calling application.

If `true`, then updates about `https://developer.android.com/reference/androidx/core/telecom/extensions/Participant`s in the call will be notified. If `false`, then the remote doesn't support this extension and participants will not be notified to the caller nor will associated actions receive state updates.

Note: Must not be queried until after `https://developer.android.com/reference/androidx/core/telecom/extensions/CallExtensionScope#onConnected(kotlin.coroutines.SuspendFunction1)` is called.