ParticipantExtension


@ExperimentalAppActions
public interface ParticipantExtension


The extension interface used to support notifying remote surfaces (automotive, watch, etc...) of state related to the Participants in the call.

This interface allows an application to notify remote surfaces of changes to 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.

Summary

Public methods

abstract void
addKickParticipantSupport(
    @NonNull SuspendFunction1<@NonNull ParticipantUnit> onKickParticipant
)

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

abstract @NonNull RaiseHandState
addRaiseHandSupport(
    @NonNull List<@NonNull Participant> initialRaisedHands,
    @NonNull SuspendFunction1<@NonNull BooleanUnit> onHandRaisedChanged
)

Adds support for notifying remote surfaces of the "raised hand" state of all Participants in the call.

abstract void

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

abstract void

Update all of the remote surfaces that the Participants of this call have changed.

Public methods

addKickParticipantSupport

Added in 1.0.0-beta01
abstract void addKickParticipantSupport(
    @NonNull SuspendFunction1<@NonNull ParticipantUnit> onKickParticipant
)

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

Parameters
@NonNull SuspendFunction1<@NonNull ParticipantUnit> 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-beta01
abstract @NonNull RaiseHandState addRaiseHandSupport(
    @NonNull List<@NonNull Participant> initialRaisedHands,
    @NonNull SuspendFunction1<@NonNull BooleanUnit> onHandRaisedChanged
)

Adds support for notifying remote surfaces of the "raised hand" state of all Participants in the call.

Parameters
@NonNull List<@NonNull Participant> initialRaisedHands

The initial List of Participants whose hands are raised, ordered from earliest raised hand to newest raised hand.

@NonNull SuspendFunction1<@NonNull BooleanUnit> 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
@NonNull RaiseHandState

The interface used to update the current raised hand state of all Participants in the call.

updateActiveParticipant

Added in 1.0.0-beta01
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
Participant participant

the Participant that is marked as the active participant or null if there is no active participant

updateParticipants

Added in 1.0.0-beta01
abstract void updateParticipants(@NonNull Set<@NonNull Participant> newParticipants)

Update all of the remote surfaces that the Participants of this call have changed.

Parameters
@NonNull Set<@NonNull Participant> newParticipants

The new set of Participants associated with this call.