KOTLIN

Android SDK

Use the native Android SDK for chat, one-to-one calls, and supported group media features.

Before you start

Authenticate the user in your own backend, decide whether they may enter the room, and request a short-lived RTC token. The client receives that token and never receives the App Secret.

Install

This guide assumes access to the mobile SDK source package. Request the package and integration assistance before following these examples.

dependencies {
  implementation(project(":sdk"))
}

// A Maven dependency can be used after the SDK is published.

Initialize and join a room

val rtc = RTCExpress(applicationContext)
rtc.init(RTCInitOptions(serverUrl, appId, userId, token, mediaMode = "auto"))
rtc.joinRoom("room-1")
rtc.callUser("user-b", video = true)

Production notes

Keep authorization on your serverDeclare INTERNET, RECORD_AUDIO, and CAMERA permissions as needed. Obtain token from your backend, never from App Secret code in the APK.

Test two real devices, permission denial, network switching, background behavior, and reconnects. Record the call ID and UTC time for diagnostics.