Skip to main content
Version: 0.1.x

Getting Started - Android SDK

Android SDK is natively written SDK using Java. It is compatible with both Java and Kotlin.

Install an Android SDK

The easiest way to get started is by installing the sdk in your app.

Step 1: Add the repositories into your project.

  • If your Android Studio Version is older than Android Studio Bumblebees, add the repository to project's build.gradle file.
  • If your are using Android Studio Bumblebees or newer Version, add the repository to settings.gradle file.
note

You can use imports with Maven Central after rtc-android-sdk version 0.1.12.

Whether on Maven or Jitpack, the same version numbers always refer to the same SDK.

build.gradle
allprojects {
repositories {
// ...
google()
mavenCentral()
maven { url "https://maven.aliyun.com/repository/jcenter" }
}
}
settings.gradle
dependencyResolutionManagement{
repositories {
// ...
google()
mavenCentral()
maven { url "https://maven.aliyun.com/repository/jcenter" }
}
}

Step 2: Add the dependency in app/build.gradle:

app/build.gradle
dependencies {
implementation 'live.videosdk:rtc-android-sdk:0.1.21'

// other app dependencies
}
info

Android SDK compatible with armeabi-v7a, arm64-v8a, x86_64 architectures. If you want to run the application in an emulator, choose ABI x86_64 when creating a device.

Step 3: Add all the following permissions to AndroidManifest.xml

AndroidManifest.xml
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

Step 4: Create MainApplication class with the following code

MainApplication.kt
package live.videosdk.demo;

import live.videosdk.rtc.android.VideoSDK;

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

VideoSDK.initialize(applicationContext)
}
}

Step 5: Add MainApplication to AndroidManifest.xml

AndroidManifest.xml
<application
android:name=".MainApplication"
>
<!-- ... -->
</application>
note

Check out official example of Android SDK implementation for Java and Kotlin as mentioned below:

Got a Question? Ask us on discord