Android
Quickstart​
This quickstart shows how to add Dyte's Live Video SDK to your Android applications.
In addition, you'll learn how Dyte's UI component library can help you build your UI faster with components designed specifically for Live Video applications.
You can also checkout our sample code for Android. You can clone and run a sample application from the Android Samples GitHub repository.
Before Getting Started​
Make sure you've a mechanism to get authToken
from your server-side, which you would have received as part of Add Participant call.
Step 1: Install the SDK using maven dependency.​
dependencies {
// (other dependencies)
implementation 'io.dyte:uikit:+'
}
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
}
}
dependencies {
// other dependencies
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}
Step 2: Initialisation configuration​
Set the properties in the DyteMeetingInfoV2
class. You just need to provide
the participant's authToken
.
Name | Description |
---|---|
authToken | After you've created the meeting, add each participant to the meeting using the Add Participant API (The presetName created earlier must be passed in the body of the Add Participant API request) The API response contains the authToken . |
val meetingInfo = DyteMeetingInfoV2(
authToken = '<auth_token>',
)
Step 3: Initialize the SDK​
The DyteUIKitBuilder
is the main class of the SDK. It is the entry point and
the only class required to initialize Dyte SDK.
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()