initialize

fun initialize(context: Context)

Starts the SDK for this process: begins audio routing, enumerates devices and hooks the activity lifecycle that pauses the webcam in the background.

Call it before anything else: createRoom and the track factories throw IllegalStateException until it has run, and getMics and getCameras come back empty. Application.onCreate is a good place. Idempotent — repeated calls do nothing.

The SDK declares ACCESS_NETWORK_STATE so a call resumes faster after a network drop.

Parameters

context

any context; only its application context is retained.