Import CallKit SDK
RC supports three methods to integrate CallKit SDK into your Android project: Maven repository, local module, and source code.
Requirements
- (SDK ≧ 5.6.3) Android 5.0 (API 21) or later
- (SDK < 5.6.3) Android 4.4 (API 19) or later
Check Version
Before importing the SDK, visit RC's official SDK download page to confirm the latest version.
Maven
Use Gradle to add dependencies for CallKit, CallLib, IMKit, and IMLib modules. Note that you must use RC's Maven repository.
-
Open the root-level
build.gradle(under Project view) and declare RC's Maven repository:allprojects {
repositories {
...
//RC Maven repository URL
maven {url "https://maven.rongcloud.cn/repository/maven-releases/"}
}
} -
In your app's
build.gradle, add the following remote dependencies. Note that RC's RTC service relies on IM channels, so IMLib must be integrated simultaneously.dependencies {
// Replace x.y.z with the actual SDK version. New users should use the latest version.
implementation 'cn.rongcloud.sdk:call_kit:x.y.z'
implementation 'cn.rongcloud.sdk:call_lib:x.y.z'
implementation 'cn.rongcloud.sdk:im_kit:x.y.z'
implementation 'cn.rongcloud.sdk:im_lib:x.y.z'
implementation 'cn.rongcloud.sdk:face_beautifier:x.y.z' // Optional beauty filter extension
}Note
- The latest version numbers of each SDK may differ and could include formats like x.y.z.h. Check RC's official SDK download page or RC's Maven repository for details.
- Starting from version 5.2.0, CallKit/CallLib must maintain version consistency with their dependent IMKit/IMLib SDKs (the first three digits must match).
Android Local Module
Before importing the SDK, you need to visit RC's official SDK download page and download the audio/video call (with UI) SDK locally.
-
In Android Studio, open your project and navigate to File > New > Import Module, then locate and import the downloaded module components.
-
In your app's
build.gradle, add local module dependencies:dependencies {
implementation project(':CallKit')
implementation project(':CallLib')
implementation project(':IMKit')
implementation project(':IMLib')
}
Manual Source Code Integration
RC provides CallKit source code to enable developers to customize call UI elements like color schemes and button layouts according to their app's design language.
CallKit GitHub Source Code: GitHub · Gitee
-
First integrate CallLib, IMKit, and IMLib—CallKit's dependency libraries—via Maven or local module, ensuring they're the latest versions available on the official website:
dependencies {
implementation 'cn.rongcloud.sdk:call_lib:x.y.z'
implementation 'cn.rongcloud.sdk:im_kit:x.y.z'
implementation 'cn.rongcloud.sdk:im_lib:x.y.z'
}Note
- RC doesn't provide source code for older CallKit versions. The CallLib, IMKit, and IMLib versions used with CallKit must be the latest available on the official website.
- Starting from version 5.2.0, CallKit/CallLib must maintain version consistency with their dependent IMKit/IMLib SDKs (the first three digits must match).
-
Navigate to your project directory and clone CallKit source code:
cd <ProjectFolder>
git clone https://github.com/rongcloud/callkit-android.git -
In your
settings.gradlefile, add the reference:include ':callkit-android' -
In your app's
build.gradle, add the dependency:dependencies {
...
implementation project(':callkit-android')
}