Join from native Android
Install the Kotlin SDK from Maven Central, join a room with a Cloud participant grant, and open Meet or Live invitations in the Android Rooms example.
Use the dTelecom Kotlin SDK to add audio, video, screen sharing and room chat to a native Android app. It supports Android API 24 and later. SDK source
Add the SDK with Gradle
Section titled “Add the SDK with Gradle”In settings.gradle.kts, include google() and mavenCentral() in dependencyResolutionManagement.repositories. Add the published SDK to your app module’s build.gradle.kts file. Maven Central release
dependencies { implementation("org.dtelecom:rtc-android:1.0.0")}Join a room
Section titled “Join a room”Have your backend issue a participant token and return token, wsUrl and the optional ranked fallbackUrls. Keep the Cloud API key and secret on your backend. Pass the URLs to the SDK in the order returned by Cloud.
import android.content.Contextimport org.dtelecom.rtc.Room
suspend fun join( context: Context, wsUrl: String, token: String, fallbackUrls: List<String> = emptyList()): Room { val room = Room(context.applicationContext) room.connect(wsUrl, token, fallbackUrls) return room}Keep the returned Room for the call. Collect room.state to display participants and tracks. To publish from the microphone or camera, declare android.permission.RECORD_AUDIO or android.permission.CAMERA in the app manifest and request the relevant permission when the user enables that source. From a coroutine, call room.setMicrophoneEnabled(true) or room.setCameraEnabled(true). Call room.disconnect() when the user leaves. Media, rendering and screen sharing · Android system calling
For encrypted media, supply the same nonempty key to each participant through your app. Pass it separately from the invitation with room.connect(wsUrl, token, fallbackUrls, encryptionKey = mediaKey). The room retains the key through reconnects.
Run the Rooms example
Section titled “Run the Rooms example”Check out the SDK repository at tag 1.0.0 and open its root in Android Studio with Android SDK Platform 36 and Build Tools 36 installed. Run the examples:rooms app. Kotlin Rooms example
Open Invite in Meet or Live. Scan the QR code in Rooms or paste the full link, enter a display name, and join. A Live viewer can watch and chat. To broadcast from the app, use the signed host invite from Show host QR. Leave Encrypt media off for a call with the standard hosted Meet or Live web interface.