Skip to main content
Version: 0.0.x

Setup

Setting up android sdk

Android SDK is client for real-time communication for android devices. It inherits the same terminology as all other SDKs does.

Minimum OS/SDK versions

It supports the following OS/SDK versions.

Android: minSdkVersion >= 18

Installation

  1. 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.
build.gradle
allprojects {
repositories {
// ...
maven { url 'https://jitpack.io' }
jcenter()
}
}

Step 2: Add the following dependency in your app's app/build.gradle.

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

// library to perform Network call to generate a meeting id
implementation 'com.amitshekhar.android:android-networking:1.0.2'

// other app dependencies
}

Integration

Step 1: Add the following permissions in AndroidManifest.xml.

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

Step 2: Create MainApplication class which will extend the android.app.Application.

MainApplication.kt
package live.videosdk.demo;

import live.videosdk.android.VideoSDK

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
VideoSDK.initialize(applicationContext)
}
}

Step 3: Add MainApplication to AndroidManifest.xml.

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

Step 4: In your JoinActivity add the following code in onCreate() method.

JoinActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_join)

val meetingId = "<meeting-id>"
val participantName = "John Doe"

var micEnabled = true
var webcamEnabled = true

// generate the jwt token from your api server and add it here
VideoSDK.config("JWT TOKEN GENERATED FROM SERVER")

// create a new meeting instance
meeting = VideoSDK.initMeeting(
this@MeetingActivity, meetingId, participantName,
micEnabled, webcamEnabled,null)

// get permissions and join the meeting with meeting.join();
// checkPermissionAndJoinMeeting();
}

All set! Here is the link to the complete sample code on Github. Please refer to the documentation for a full list of available methods, events and features of the SDK.