Android SDK
The native Android SDK (Kotlin / Java) handles sign-in, the long-lived connection and reconnects, multi-device sync, the local database and the message send queue; offline push, audio and video calls and Coil image loading are optional add-ons.

| Item | Details |
|---|---|
| Current version | 2.0.1 (Versions and support) |
| Runs on | Android 7.0 (API 24) and later |
| Build requirements | compileSdk 35 or later; Java / Kotlin targeting JVM 11 |
| How to get it | Download the source package and build a local Maven repository (not yet on public Maven) |
| UI | No chat UI components; your app builds the interface, and the example app is a reference |
Install
- Download and unzip the source package. In its root, run
make sdk-android-publish-localand copy the generatedsdk/android/build/maven-repointo your project aslocal-im-maven. - Add the repository in
settings.gradle.kts:
kotlin
// Gradle 配置,不是 App 运行时代码。
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri(rootDir.resolve("local-im-maven")) }
// 仅接入 im-call 时需要。
maven("https://jitpack.io") {
content { includeGroup("com.github.davidliu") }
}
}
}- Add the dependencies in your app's
build.gradle.kts:
kotlin
// Gradle 配置。
android {
defaultConfig { minSdk = 24 }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
dependencies {
implementation(platform("com.deeprespond.im:im-bom:2.0.1"))
implementation("com.deeprespond.im:im")
// 按需选择:
implementation("com.deeprespond.im:im-push")
implementation("com.deeprespond.im:im-call")
implementation("com.deeprespond.im:im-coil")
}Set Kotlin's jvmTarget to 11 as well. The BOM keeps the modules on one version; don't mix versions.
Minimal example
Sign in and send bob a message:
kotlin
import com.deeprespond.im.*
val im = DRClient.initialize(context, DRClientOptions(
appKey = "org#app",
apiUrl = "https://api.example.com",
))
im.auth.awaitRestored()
if (im.auth.currentUser == null) {
im.auth.loginWithTicket(ticket) // 业务服务端签发的登录凭证
}
im.connection.waitUntilReady()
im.messages.send(SendTarget.User("bob"), OutgoingContent.Text("你好"))For a complete first screen (conversations, message list, sign-out), see the Quickstart.
What you can build
| Feature | Docs |
|---|---|
| Initialization, sign-in, connection state | Initialization, sign-in and connection |
| Conversation list, unread counts, pinning, drafts | Conversations |
| Sending, recalling, reactions, read receipts, search | Messages |
| Profiles, friends, presence | Users, friends and presence |
| Groups, chat rooms | Groups, Chat rooms |
| Images, files, voice recording | Files, images and recording |
| Voice and video calls, standalone RTC channels | Audio and video calls, Channels |
| Streaming AI bot replies | AI replies |
| FCM and Chinese vendor push, Do Not Disturb, reports | Offline push, Reminders, Do Not Disturb and reports |
| Events, errors, UI lifecycle | Events and errors, UI and lifecycle |
| Calling from Java, the full API | Java, API reference, Data types |
Modules
| Artifact | Purpose | When you need it |
|---|---|---|
im | Client, secure storage, database, file and media processing, recording | Always |
im-push | FCM, notifications, badges | For offline push |
im-push-huawei and 5 others | Huawei, Honor, Xiaomi, OPPO, vivo and Meizu channels | When shipping in mainland China |
im-call | LiveKit audio and video, the system incoming-call screen | For calls |
im-coil | Coil 3 image loading | When you display images with Coil |
im-bom | Aligns module versions | Always |
The Java facade ships with the artifacts; you don't need to configure KSP.
Troubleshooting
| Symptom | Check |
|---|---|
| Gradle can't find the artifacts | Build and copy maven-repo first, and declare the repository in dependencyResolutionManagement |
| Kotlin metadata or JVM target mismatch | Set both Java and Kotlin to JVM 11; Kotlin 2.4 with AGP 9.1 is verified |
| A dependency requires a higher compileSdk | minSdk is the runtime requirement; compileSdk must be at least 35 |
| Vendor channel classes not found | Add the matching im-push-* module and the vendor's own dependency |
calls.supported is false | Check that im-call is included and the media service is configured |
| Release builds behave differently | The artifacts include ProGuard rules; with R8 enabled, verify again with a release build |
Next steps
- Quickstart: from initialization to your first chat screen.
- Demo guide and download: a complete example you can run.
- Versions and support: the current version, verified environments and known limits.
