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

*** ** * ** ***


```
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/kotlin/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/kotlin/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 functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/KickParticipantAction` | `@https://developer.android.com/reference/kotlin/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtensionRemote#addKickParticipantAction()()` Adds the ability for the user to request to kick `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s in the call. |
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/RaiseHandAction` | `@https://developer.android.com/reference/kotlin/androidx/core/telecom/util/ExperimentalAppActions https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtensionRemote#addRaiseHandAction(kotlin.coroutines.SuspendFunction1)( onRaisedHandsChanged: suspend (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant>) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds the "raise hand" action and provides the remote surface with the ability to display which `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant`s have their hands raised and an action to request to raise and lower their own hand. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ParticipantExtensionRemote#isSupported()` Whether or not the participants extension is supported by the calling application. |

## Public functions

### addKickParticipantAction

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

```
@ExperimentalAppActions
fun addKickParticipantAction(): KickParticipantAction
```

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

```kotlin
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/kotlin/androidx/core/telecom/extensions/KickParticipantAction` | The action that is used to send kick Participant event requests to the remote Call. |

### addRaiseHandAction

```
@ExperimentalAppActions
fun addRaiseHandAction(
    onRaisedHandsChanged: suspend (List<Participant>) -> Unit
): RaiseHandAction
```

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

```kotlin
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/kotlin/androidx/core/telecom/extensions/CallExtensionScope#onConnected(kotlin.coroutines.SuspendFunction1)` is called.

| Parameters |
|---|---|
| `onRaisedHandsChanged: suspend (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/Participant>) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Called when the List of `https://developer.android.com/reference/kotlin/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/kotlin/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. |

## Public properties

### isSupported

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

```
val isSupported: Boolean
```

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

If `true`, then updates about `https://developer.android.com/reference/kotlin/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/kotlin/androidx/core/telecom/extensions/CallExtensionScope#onConnected(kotlin.coroutines.SuspendFunction1)` is called.