Integrate Android SDK
Android SDK is a native Kotlin SDK. It makes it simple to integrate video and audio calls and interactive live streams into your app.
Version 3.x supports Kotlin only. Java callers are not supported, so the code that calls the SDK must be in Kotlin, built with Kotlin 1.8 or later. If you are upgrading from 2.x, follow the Migration Guide.
Installing Android SDK
Step 1: Add the repository into your project
The SDK is published on Maven Central. Make sure mavenCentral() is listed in the settings.gradle.kts file of your project.
dependencyResolutionManagement {
repositories {
// ...
google()
mavenCentral()
}
}
Step 2: Add the dependency in app/build.gradle.kts
dependencies {
implementation("live.videosdk:rtc-android-sdk:3.0.0")
// other app dependencies
}
Most SDK actions, such as join(), leave() and the mic and camera toggles, are suspend functions. Call them from a coroutine and catch VideoSDKException. The SDK brings kotlinx-coroutines-android with it. To launch coroutines with lifecycleScope, add androidx.lifecycle:lifecycle-runtime-ktx if your app doesn't already have it. See Coroutines and Error Handling.
Step 3: Add permissions in AndroidManifest.xml
The SDK doesn't add these permissions to your app, so declare them in your app's manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
To route audio to Bluetooth headsets, also declare BLUETOOTH_CONNECT (Android 12 and later) or BLUETOOTH (Android 11 and earlier). On Android 12 and later, BLUETOOTH_CONNECT is a runtime permission, so also request it, for example with VideoSDK.checkPermissions(context, listOf(Permission.bluetooth), permissionHandler = handler).
- The SDK needs Android 7.0 (API level 24) or later. Set
minSdkto 24 or higher. - The SDK supports only
arm64-v8aandarmeabi-v7a. Run your app on an ARM phone, or on an emulator with anarm64-v8asystem image. x86 / x86_64 emulator images are not supported.
Got a Question? Ask us on discord

