Flow for streaming. It is the only server-side SDK that includes WebRTC voice — audio
capture, WebRTC negotiation, and VAD are all handled inside the SDK.
For a complete integration walkthrough — including Gradle setup, Compose ViewModel examples,
runtime permission handling, and AudioManager configuration — see the
Android guide.
Install
AndroidManifest.xml:
Quick example
KioskConfig fields
Your device credential token in
hk_live_… format. Store in BuildConfig (injected from
local.properties) — never commit to source control.Mode.SANDBOX returns instant stub responses without consuming AI credits. Use Mode.LIVE
for production.OkHttp call timeout in seconds. Applied to the session open call and each
sendMessage()
call.Number of automatic retries on provider errors (
503). Uses exponential back-off starting
at 1 second.Override the API base URL. Useful for testing against a local proxy or staging environment.
Exception types
RECORD_AUDIO permission was not granted before calling openVoiceSession(). Request the
permission in your Activity or Composable before starting a voice session.