Skip to main content

Installation

  1. In your project, add the Maven repository https://maven.dyte.in. The repository typically goes into the build.gradle file in the root of your project.
allprojects {
repositories {
// (other repositories)
mavenCentral()
}
}
  1. Add the dependency com.dyteclientmobile:sdk. Dependency definitions belong in the individual module build.gradle files.
dependencies {
// (other dependencies)
implementation 'io.dyte:uikit:0.0.3'
}
info

The below instructions are for the release builds, debug builds should work without any additional steps.

  1. Create / append to the file android/app/proguard-rules.pro
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}

# keep webrtc classes
-keep class org.webrtc.** { *; }
-dontwarn org.chromium.build.BuildHooksAndroid

# keep ktor classes
-keep class io.ktor.** { *; }
  1. In your android/app/build.gradle edit the release configuration and add the following line importing the proguard configuration
buildTypes {
release {
...
...
...
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Configure the meeting connection

You need to pass a DyteUIKitConfig to DyteUIKitBuilder to define which meeting should the client connect to and a couple of other setup parameters, out of which only authToken and roomName are mandatory.

DyteUIKitBuilder is a static class and can be used to control and observe the meeting from anywhere in your application.