Skip to main content

Quickstart

This quickstart shows how to use Dyte's Android UI Kit SDK to add live video and audio to your Android applications.

To get started quickly, you can use our sample code. Simply clone and run a sample application from the Android UIKit samples, available in both Kotlin and Java.

Objective

You'll learn how to:

Before Getting Started

Make sure you've read the Getting Started with Dyte topic and completed the steps in the Integrate Dyte section. You must complete the following steps:

Step 1: Install the SDK from MavenCentral

dependencies {
// (other dependencies)
implementation 'io.dyte:uikit:+'
}
Note

If your app targets to lower versions of android (android api <= 24), Please enable core desugering in your app's build.gradle file like follows.

android {
// other configurations
compileOptions {
// other configurations
isCoreLibraryDesugaringEnabled = true

// Sets Java compatibility to Java 8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}

dependencies {
// other dependencies
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}

Step 2: Configure a Dyte meeting

Configure the following properties in the DyteMeetingInfoV2 class. You must pass a valid participant authToken obtained from the Add Participant API.

NameDescription
authTokenAuthentication token generated using the Add Participant API after meeting creation.
enableAudioSet whether to join the meeting with your Mic ON (true) or OFF (false).
enableVideoSet whether to join the meeting with your Camera ON (true) or OFF (false).
baseUrlBase URL of the Dyte environment you have created the meeting on.
val meetingInfo = DyteMeetingInfoV2(
authToken = "<auth_token>",
enableAudio = true,
enableVideo = true,
baseUrl = "dyte.io"
)

Step 3: Initialize the SDK

Initialize the DyteUIKit with the DyteUIKitBuilder class, using the meetingInfo configured above.

val dyteUIKitInfo = DyteUIKitInfo(
activity = this,
dyteMeetingInfo = meetingInfo
)
val dyteUIKit = DyteUIKitBuilder.build(dyteUIKitInfo)

Step 4: Launch the meeting UI

To launch the meeting UI all you need to do is call startMeeting() which will take care of everything for you.

dyteUIKit.startMeeting()

meeting UI screenshot with labeled parts

meeting UI screenshot with labeled parts

meeting UI screenshot with labeled parts