RemoteSupportClientKotlin

open class RemoteSupportClientKotlin(    context: Context,     apiUrlBase: String,     apiKey: String,     logger: Logger,     retainLogs: Boolean = true) : IRemoteSupportClient

The main class for this library. Contains functionality to initiate new sessions, connect to existing sessions, send outgoing messages and receiving incoming messages over the DataChannel

Parameters

context

The Android app context

apiUrlBase

The base url for the service API endpoints.

apiKey

The security key required to access cygnus reach services.

logger

The user-defined Logger that should be used to log messages in this SDK

retainLogs

true indicates the logs will be stored internally for later upload; false otherwise.

categories

The MessageCategory for this instance of the client. Optionally defined user or initialized to our default implementation.

Constructors

Link copied to clipboard
fun RemoteSupportClientKotlin(    context: Context,     apiUrlBase: String,     apiKey: String,     logger: Logger,     retainLogs: Boolean = true)

Construct a new RemoteSupportClientKotlin.

Functions

Link copied to clipboard
open suspend override fun addScreenSharing(initializer: ScreenFormat): Boolean

Share the app screen with the remote peer

Link copied to clipboard
open suspend override fun addVideoStream(videoStreamConfiguration: CameraFormat): Boolean

Add a video stream to the remote support session.

Link copied to clipboard
open override fun close()

Close the entire remote support connection to the peer.

Link copied to clipboard
open suspend override fun connectToSupportSession(pin: String)

Initializes the data transport and connects to an existing remote support session created by initiateSupportSession by another client

Link copied to clipboard
fun getSessionId(): String

The sessionId of the current session WebRTCClient session..

Link copied to clipboard
open suspend override fun initiateSupportSession(): String

Initialize a new remote support session with a new unique pin

Link copied to clipboard
open suspend override fun sendCommand(cmd: Command): ICommandReceipt

Sends the provided Command to the remote peer

Link copied to clipboard
open suspend override fun sendNotification(notif: Notification): Int

Sends the provided Notification to the remote peer

Link copied to clipboard
open suspend override fun sendQuery(query: Query): IQueryReceipt

Sends the provided Query to the remote peer

Link copied to clipboard
suspend fun sendQueryResponse(    category: Int,     qr: QueryResponse? = null,     qe: QueryError? = null)
Link copied to clipboard
open override fun updateLogger(logger: ILogger)

Update the remote support client's logger

Properties

Link copied to clipboard
open override val connectionState: StateFlow<RemoteSupportClientConnectionState>

Client connection state

Link copied to clipboard
open override val isConnected: Boolean

true indicates a IRemoteSupportClient is connected; false otherwise.

Link copied to clipboard
open override val onCommand: SharedFlow<CommandEventArgs>

Event raised when a Command is received from the remote peer. The remote peer is notified when the command is acknowledged using the ICommandContext.

Link copied to clipboard
open override val onConnect: SharedFlow<Unit>

Event raised when the IRemoteSupportClient is connected.

Link copied to clipboard
open override val onDisconnect: SharedFlow<DisconnectEventArgs>

Event raised when the IRemoteSupportClient is disconnected.

Link copied to clipboard
open override val onMessageError: SharedFlow<MessageErrorEventArgs>

Event raised when a message error is raised locally, or when the remote client raises a message error.

Link copied to clipboard
open override val onNotification: SharedFlow<NotificationEventArgs>

Raised when a Notification is received from the remote peer.

Link copied to clipboard
open override val onPartialMessage: SharedFlow<PartialMessageReceivedEventArgs>

Event raised when a chunk of a large message has been received.

Link copied to clipboard
open override val onQuery: SharedFlow<QueryEventArgs>

Event raised when a Query is received from the remote peer. Responses sent using the IQueryContext are sent to the remote peer. If multiple responses are required, pass false to IQueryContext.respond's isFinal parameter for the initial series of responses and true for the final response

Link copied to clipboard
open override val onScreenCapture: SharedFlow<ScreenCaptureEventArgs>

Event raised when an outbound media stream created by a screen capture session has been connected

Link copied to clipboard
open override val onVideoCapture: SharedFlow<VideoCaptureEventArgs>

Event raised when an outbound local media stream has been connected