SerenadaDiagnostics

class SerenadaDiagnostics(config: SerenadaConfig, context: Context)

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

Constructors

Link copied to clipboard
constructor(config: SerenadaConfig, context: Context)

Functions

Link copied to clipboard
fun checkCamera(completion: (DiagnosticCheckResult) -> Unit)

Check whether a camera is available and authorized.

Link copied to clipboard

Check whether a microphone is available and authorized.

Link copied to clipboard

Check whether a network connection is available.

Link copied to clipboard

Check signaling server connectivity (WebSocket or SSE).

Link copied to clipboard

Check whether an audio output (speaker) is available.

Link copied to clipboard
fun checkTurn(completion: (TurnCheckResult) -> Unit)

Check TURN server reachability and measure latency.

Link copied to clipboard
suspend fun runAll(): DiagnosticsReport

Run all diagnostic checks and return a full report.

fun runAll(completion: (DiagnosticsReport) -> Unit)

Callback-based variant of runAll. Results are delivered on the main thread.

Link copied to clipboard
suspend fun runConnectivityChecks(host: String = config.serverHost): ConnectivityReport

Test server connectivity (room API, WebSocket, SSE, TURN).

Link copied to clipboard
suspend fun runIceProbe(turnsOnly: Boolean, host: String = config.serverHost, onCandidateLog: (String) -> Unit? = null): IceProbeReport

Probe ICE connectivity (STUN/TURN) and return candidate details.

Link copied to clipboard
suspend fun validateServerHost(host: String = config.serverHost)

Validate that a server host is reachable. Throws on failure.