Kotlin extension (KTX)
Kotlin Extension (KTX) for Sendbird Chat SDK, leverages Kotlin features such as extension functions, coroutines, and flow to enhance your development process. This allows you to shift from the traditional callback approach to leveraging coroutines for a more modern development style.
The following are the wrapper interfaces for Chat SDK's APIs.
suspend fun
Flow
Note: Kotlin extension (KTX) is not an independent SDK and must be used with Sendbird Chat SDK. It's recommended that you use the same version of KTX as the Chat SDK.
Requirements
The minimum requirements to use the Kotlin extension for Chat SDK are the following.
Android 5.0 (API level 21) or higher
Java 8 or higher
Android Gradle plugin 3.4.2 or higher
Kotlin 1.6.21 or higher
Coroutine 1.6.4 or higher
Dependencies
It’s recommended to use matching major and minor version numbers for Chat SDK and KTX (e.g., Chat SDK: 4.15.1 with KTX: 4.15.x), where the last digit can differ to allow patch updates.
Note: If the KTX minor version is higher, the Chat SDK version is automatically updated. For version information, see this changelog.
To install the Chat SDK and Chat KTX SDK into your project, add the following dependencies to your module build.gradle
file:
API Reference
For more details on Kotlin extension for Chat SDK, see the API Reference page.