Package-level declarations

Types

Link copied to clipboard
data class CallDiagnostics(val isSignalingConnected: Boolean = false, val iceConnectionState: IceConnectionState = IceConnectionState.NEW, val peerConnectionState: PeerConnectionState = PeerConnectionState.NEW, val rtcSignalingState: RtcSignalingState = RtcSignalingState.STABLE, val activeTransport: String? = null, val callStats: CallStats = CallStats(), val realtimeStats: RealtimeCallStats? = null, val isFrontCamera: Boolean = true, val isScreenSharing: Boolean = false, val isFlashAvailable: Boolean = false, val isFlashEnabled: Boolean = false, val remoteContentCid: String? = null, val remoteContentType: String? = null, val featureDegradations: List<FeatureDegradationState> = emptyList())
Link copied to clipboard
sealed class CallError

Typed error representation for SDK call errors. Matches the iOS CallError enum for cross-platform parity.

Link copied to clipboard
data class CallQualitySummary(val mosScore: Double? = null, val packetLossPct: Double? = null, val medianLatencyMs: Int? = null, val medianJitterMs: Int? = null, val countDisconnects: Int = 0, val countReconnects: Int = 0, val totalDropoutDurationMs: Long = 0, val qualitySampleCount: Int = 0)

Immutable snapshot of aggregate call quality, computed by the SDK and consumed by hosts to populate their call-ended analytics. Updated live during the call and finalized at call end; remains readable after the session stops.

Link copied to clipboard
data class CallState(val phase: CallPhase = CallPhase.Idle, val roomId: String? = null, val localCid: String? = null, val isHost: Boolean = false, val participantCount: Int = 0, val callStartedAtMs: Long? = null, val localAudioEnabled: Boolean = true, val localVideoEnabled: Boolean = true, val localCameraEnabled: Boolean = true, val localContent: ParticipantContent? = null, val localDisplayName: String? = null, val localAudioLevel: Float = 0.0f, val remoteParticipants: List<RemoteParticipant> = emptyList(), val connectionStatus: ConnectionStatus = ConnectionStatus.Connected, val signalingState: SignalingState = SignalingState.Connected, val localCameraMode: LocalCameraMode = LocalCameraMode.SELFIE, val availableCameraModes: List<LocalCameraMode> = DEFAULT_CAMERA_MODES, val error: CallError? = null, val requiredPermissions: List<MediaCapability> = emptyList())

SDK-native call state. This is the primary observable state for SDK consumers. Does not include host-app concerns (saved rooms, settings, etc.).

Link copied to clipboard
data class CallStats(val bitrate: Double? = null, val packetLoss: Double? = null, val jitter: Double? = null, val codec: String? = null, val iceCandidatePair: String? = null, val roundTripTime: Double? = null, val audioRxKbps: Double? = null, val audioTxKbps: Double? = null, val videoRxKbps: Double? = null, val videoTxKbps: Double? = null, val videoFps: Double? = null, val videoResolution: String? = null, val realtimeStats: RealtimeCallStats? = null, val updatedAtMs: Long = 0)

Aggregated call statistics exposed to SDK consumers. Populated from WebRTC getStats() periodically during an active call.

Link copied to clipboard
sealed class CheckOutcome
Link copied to clipboard
sealed class ConnectionEvent

Connection-quality event emitted by the SDK through SerenadaCoreDelegate.onConnectionEvent.

Link copied to clipboard
data class ConnectionInfo(val transport: String? = null)
Link copied to clipboard
data class ConnectivityReport(val roomApi: CheckOutcome = CheckOutcome.NotRun, val webSocket: CheckOutcome = CheckOutcome.NotRun, val sse: CheckOutcome = CheckOutcome.NotRun, val diagnosticToken: CheckOutcome = CheckOutcome.NotRun, val turnCredentials: CheckOutcome = CheckOutcome.NotRun)
Link copied to clipboard
data class CreateRoomResult(val roomId: String, val roomUrl: String)
Link copied to clipboard
data class DeviceInfo(val id: String, val name: String, val kind: String)
Link copied to clipboard
data class DiagnosticsReport(val camera: DiagnosticCheckResult, val microphone: DiagnosticCheckResult, val speaker: DiagnosticCheckResult, val network: DiagnosticCheckResult, val signaling: SignalingCheckResult, val turn: TurnCheckResult, val devices: List<DeviceInfo>)
Link copied to clipboard

Reason a dropout began, carried so hosts can distinguish recovery causes.

Link copied to clipboard
sealed class EndReason
Link copied to clipboard
data class ErrorEvent(val code: String, val message: String)
Link copied to clipboard
data class FeatureDegradationState(val kind: FeatureDegradation, val reason: String? = null)
Link copied to clipboard
data class IceProbeReport(val stunPassed: Boolean, val turnPassed: Boolean, val logs: List<String>, val iceServersSummary: String = "n/a")
Link copied to clipboard
data class JoinedEvent(val peerId: String, val participants: List<SignalingProviderParticipant>, val hostPeerId: String? = null, val maxParticipants: Int? = null, val epoch: Long? = null, val reconnectOutcome: JoinReconnectOutcome? = null, val reconnectToken: String? = null, val reconnectTokenTTLMs: Long? = null)
Link copied to clipboard
data class JoinOptions(val reconnectPeerId: String? = null, val maxParticipants: Int? = null, val displayName: String? = null, val appPeerId: String? = null, val independentContentVideo: Boolean = false, val videoMediaEnabled: Boolean = true)
Link copied to clipboard

Disposition of a join, surfaced by the server in joined.reconnect. Drives whether the SDK preserves media-active peer connections, schedules dirty-pair renegotiation, or starts ground-up.

Link copied to clipboard

Device media capabilities required for a call.

Link copied to clipboard
data class NegotiationDirtyEvent(val withCid: String)

Server tells an active peer that a previously-suspended peer has reattached AND there was pending negotiation traffic to it during the suspension. The SDK should perform glare-safe fresh negotiation / ICE restart for the named CID.

Link copied to clipboard

Wire-level status values for a remote participant's signaling transport. The server uses "suspended" to indicate a participant whose transport dropped but whose room slot is being held open for reconnect. "active" is the default for participants with a live transport attached.

Link copied to clipboard
data class PeerEvent(val peerId: String, val joinedAt: Long? = null, val displayName: String? = null, val appPeerId: String? = null)
Link copied to clipboard
data class PeerMessage(val from: String, val type: String, val payload: <Error class: unknown class>? = null)
Link copied to clipboard
data class ProviderCapabilities(val handlesReconnection: Boolean = false)
Link copied to clipboard
data class ReconnectTokenRefreshedEvent(val reconnectToken: String, val reconnectTokenTTLMs: Long? = null)
Link copied to clipboard
data class RecoveryRecord(val roomId: String, val cid: String, val reconnectToken: String, val lastEpoch: Long?, val sessionStartTs: Long, val expiresAtMs: Long)

Persisted call-recovery state — surfaced to host apps so a relaunched process can prompt the user to rejoin an in-flight call instead of silently dropping them on the home screen.

Link copied to clipboard
data class RelayFailedEvent(val reason: String, val targets: List<String>, val of: String? = null)

Server tells the sender it could not deliver a relay because the target had no transport.

Link copied to clipboard
data class RoomEndedEvent(val by: String? = null, val reason: String)
Link copied to clipboard
data class RoomOccupancy(val count: Int, val maxParticipants: Int? = null)
Link copied to clipboard
data class RoomStateEvent(val participants: List<SignalingProviderParticipant>, val hostPeerId: String? = null, val maxParticipants: Int? = null, val epoch: Long? = null)
Link copied to clipboard
class RoomWatcher constructor(okHttpClient: <Error class: unknown class> = OkHttpClient.Builder().build(), handler: <Error class: unknown class> = Handler(Looper.getMainLooper()))

Monitors room occupancy via signaling. Use this to show room status before joining.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class SerenadaConfig(val serverHost: String? = null, val signalingProvider: SignalingProvider? = null, val defaultAudioEnabled: Boolean = true, val defaultVideoEnabled: Boolean = true, val videoMediaEnabled: Boolean = true, val enableIndependentContentVideo: Boolean = false, val cameraModes: List<LocalCameraMode>? = null, val isHdVideoExperimentalEnabled: Boolean = false, val deferInitialAnswer: Boolean = false, val transports: List<SerenadaTransport> = listOf(SerenadaTransport.WS, SerenadaTransport.SSE), val proximityMonitoringEnabled: Boolean = false, val audioCoordinator: SerenadaAudioCoordinator? = null, val audioIntent: AudioIntent = AudioIntent(), val enableOpusRed: Boolean = false, val enableOpusDtx: Boolean = false)

Configuration for the Serenada SDK.

Link copied to clipboard
class SerenadaCore(val config: SerenadaConfig, context: <Error class: unknown class>)

Main entry point for the Serenada SDK.

Link copied to clipboard

Delegate interface for receiving SDK lifecycle callbacks. All methods have default no-op implementations so only relevant callbacks need overriding.

Link copied to clipboard

Pre-flight diagnostics utility. Checks device capabilities and server connectivity without prompting for permissions.

Link copied to clipboard
interface SerenadaLogger
Link copied to clipboard
Link copied to clipboard

Represents an active call session. Created via SerenadaCore.join or SerenadaCore.createRoom.

Link copied to clipboard

Available signaling transport types.

Link copied to clipboard
Link copied to clipboard

Transport-agnostic signaling contract for Android SDK sessions.

Link copied to clipboard
data class SignalingProviderParticipant(val peerId: String, val joinedAt: Long? = null, val displayName: String? = null, val appPeerId: String? = null, val audioEnabled: Boolean? = null, val videoEnabled: Boolean? = null, val connectionStatus: ParticipantSignalingStatus = ParticipantSignalingStatus.ACTIVE, val contentState: SignalingProviderParticipantContentState? = null, val capabilities: SignalingProviderParticipantCapabilities? = null, val mediaPolicy: SignalingProviderParticipantMediaPolicy? = null)
Link copied to clipboard
data class SignalingProviderParticipantCapabilities(val independentContentVideo: Boolean = false)

Allowlisted static capabilities a participant advertised at join, surfaced verbatim by the provider. Unknown keys are dropped upstream.

Link copied to clipboard
data class SignalingProviderParticipantContentState(val active: Boolean, val contentType: String? = null, val updatedAtMs: Long? = null, val epoch: Long? = null, val revision: Long? = null)
Link copied to clipboard
data class SignalingProviderParticipantMediaPolicy(val videoMediaEnabled: Boolean = true)

Allowlisted per-session media policy a participant advertised at join.

Link copied to clipboard
sealed interface SignalingState

Richer view of the local signaling transport state. Apps can use this to render reconnect spinners, "you have been disconnected" UI, and a hard- eviction countdown when applicable. CallState.connectionStatus remains the simpler tri-value summary.

Link copied to clipboard

Errors thrown by SerenadaSession.captureSnapshot. Each variant has a machine-readable identity via type checks (e.g. is SnapshotError.StreamNotActive).

Link copied to clipboard
data class SnapshotResult(val jpeg: ByteArray, val width: Int, val height: Int, val timestampMs: Long, val source: SnapshotSource)

A single decoded JPEG frame plus its metadata, returned from SerenadaSession.captureSnapshot on success.

Link copied to clipboard
sealed interface SnapshotSource

Identifies which video stream a snapshot should capture.

Link copied to clipboard
sealed class TurnCheckResult

Properties

Link copied to clipboard

Default preference order for SerenadaConfig.cameraModes when left null.