VoxeetSDK
VoxeetSDK is the main object which provides methods interacting with the Voxeet service. It is the entry point to call the embedded services and static elements for developers. The SDK is asynchronous and uses promise at its core.
Typical application workflow:
1. The application accesses the Voxeet SDK instance by calling the instance method.
2. The application initializes the Voxeet SDK through the initialize method.
3. The application uses the proper method to retrieve the unique instance for a desired service. For example, the application uses the conference method to retrieve the ConferenceService instance.
Note: To use the EventBus and retrieve its unique instance, the application needs to call the getEventBus method. Then, the application can register and deregister the object from the EventBus.
Available in the package com.voxeet.VoxeetSDK.
Methods
instance
▸ instance(): VoxeetSDK
Accesses the instance of the SDK which enables to use methods specific for the SDK.
Services are available using static methods.
Note: Every service method can return a null object if the SDK is initialized for the first time.
Returns: @NonNull VoxeetSDK - The SDK instance if the static initialize method was called.
initialize
▸ initialize(@NonNull accessToken
: String, @NonNull refreshToken
: RefreshTokenCallback): void
Initializes the SDK with an access token that is provided by the customer's backend communicating with the Voxeet servers. The access token allows securing the customer key and secret. Due to a limited period of validity for security reasons, the token needs to be refreshed. To refresh the token, the Voxeet SDK calls the callback that calls the customer's backend and returns a promise containing the refreshed access token.
Parameters
Name | Type | Description |
---|---|---|
accessToken | String | non null The access token that is provided by the customer's backend. |
refreshToken | RefreshTokenCallback | non null A callback that returns a promise when the access token needs to be refreshed. |
conference
▸ conference(): ConferenceService
Retrieves the unique ConferenceService instance which enables the participant to interact with conferences.
Returns: @NonNull ConferenceService - With an initialized SDK, the instance of the ConferenceService.
mediaDevice
▸ mediaDevice(): MediaDeviceService
Retrieves the unique MediaDeviceService instance which enables the participant to interact with devices through the system.
Returns: @NonNull MediaDeviceService - With an initialized SDK, the instance of the MediaDeviceService.
screenShare
▸ screenShare(): ScreenShareService
Retrieves the unique ScreenShareService instance which enables the participant to use the screen sharing option.
Returns: @NonNull ScreenShareService - With an initialized SDK, the instance of the ScreenShareService.
session
▸ session(): SessionService
Retrieves the unique SessionService instance which enables the participant to use sessions.
Returns: @NonNull SessionService - With an initialized SDK, the instance of the SessionService.
filePresentation
▸ filePresentation(): FilePresentationService
Retrieves the unique FilePresentationService instance which enables the participant to use file presentations.
Returns: @NonNull FilePresentationService - With an initialized SDK, the instance of the FilePresentationService.
videoPresentation
▸ videoPresentation(): VideoPresentationService
Retrieves the unique videoPresentationService instance which enables the participant to use video presentations.
The UXKit also provides components extending this service with automatic injection of various plugins such as Youtube or MP4.
Returns: @NonNull VideoPresentationService - With an initialized SDK, the instance of the VideoPresentationService.
audio
▸ audio(): AudioService
Retrieves the unique AudioService instance which enables the participant to manage the audio connection.
Returns: @NonNull AudioService - With an initialized SDK, the instance of the AudioService.
video
▸ video(): VideoService
Retrieves the unique VideoService instance which enables the participant to interact with video related API.
Note: This method is available only in SDK 3.7 and later.
Returns: @NonNull VideoService - With an initialized SDK, the instance of the VideoService.
recording
▸ recording(): RecordingService
Retrieves the unique RecordingService instance which enables the participant to use the recording option.
This service wraps the recording related calls.
Returns: @NonNull RecordingService - With an initialized SDK, the instance of the RecordingService.
command
▸ command(): CommandService
Retrieves the unique CommandService instance which enables the participant to send messages in a string formatted shape into specified conferences.
Returns: @NonNull CommandService - With an initialized SDK, the instance of the CommandService.
notification
▸ notification(): NotificationService
Retrieves the unique NotificationService instance which enables forwarding notifications from developer to the properly registered manager.
Returns: @NonNull NotificationService - With an initialized SDK, the instance of the NotificationService.
getEventBus
▸ getEventBus(): EventBus
Retrieves the instance of EventBus used by the SDK.
Returns: @NonNull EventBus - The instance of the EventBus used internally.
register
▸ register(@Nullable subscriber
: Object): boolean
Registers object into the EventBus of the SDK. Call this method before creating or joining any conference to trigger events.
Parameters
Name | Type | Description |
---|---|---|
subscriber | Object | nullable subscriber |
Returns: boolean
unregister
▸ unregister(@NonNull subscriber
: Object): void
Deregisters from the EventBus instance. Call this method to remove your Activity or Fragment.
Parameters
Name | Type | Description |
---|---|---|
subscriber | Object | non null subscriber |
Updated 8 months ago