SessionService

The SessionService allows an application to register participants' information in the Voxeet service. The application needs to open a session before it can interact with the service further. The application may open and close sessions multiple times.

Typical application workflow:

1. The application opens a session using the open method.

2. The application can check state of the WebSocket by monitoring the SocketStateChangeEvent or using the isSocketOpen method.

3. The application closes the session using the close method.

Using the SessionService the application can also check whether the specific participant is a local participant or an external participant.

Available in the package com.voxeet.sdk.services.SessionService.

Methods

open

open(@NonNull participantInfo: ParticipantInfo): Promise<Boolean>

Opens a session using information form the ParticipantInfo model.

Parameters

NameTypeDescription
participantInfoParticipantInfonon null ParticipantInfo which should contain at least one ParticipantName

Returns: @NonNull Promise<Boolean> - the promise to resolve.

open

open(): Promise<Boolean>

Opens a session using information from the previously closed session. It can also create a temporary "ghost" session.

Returns: @NonNull Promise<Boolean> - the promise to resolve.

isSocketOpen

isSocketOpen(): boolean

Checks if the WebSocket is open. In the SDK, the WebSocket is the last stage of the login process, the first stage is the authentication using the REST API.

Returns: boolean - the current connectivity check.

isLocalParticipant

isLocalParticipant(@NonNull participant: Participant): boolean

Checks if the specific participant is a local participant or an external participant.

Parameters

NameTypeDescription
participantParticipantnon null valid participant's ID

Returns: boolean - in the case of local participants, the application receives the same Voxeet IDs.

close

close(): Promise<Boolean>

Logs out from the current session. Logging out cancels all logging processes and leaves the conference.

Returns: @NonNull Promise<Boolean> - the promise to resolve.

Events

SocketStateChangeEvent

Emitted when the WebSocket state has changed.

Available in the package com.voxeet.sdk.events.sdk.SocketStateChangeEvent.

state (WebSocketState)

The new state of the socket.