startSession

suspend fun startSession(types: Set<DeviceType>? = null, restoreToken: String? = null, persistMode: PersistMode? = null, parentWindow: String = ""): Result<StartResponse>(source)

Convenience function that performs the complete remote desktop session flow: creates a session, selects devices, and starts the session.

This combines createSession, selectDevices, and start into a single call.

Return

Result containing StartResponse with selected devices and session info.

Parameters

types

Set of device types to request remote control of. Default is all available types.

restoreToken

Optional token to restore a previous session (version 2+).

persistMode

How this session should persist (version 2+).

parentWindow

Identifier for the application window. Use empty string if no parent window.