Browse SDKs · Android
Platform
SDKsAndroid

Integrate for Android

Add OpenIM Android SDK dependencies and network permissions to your Android project.

Copy

Before integrating the OpenIM Android SDK into a native Android project, declare the core dependencies in your Gradle build scripts and request the required network permissions in the application manifest. After configuring your build environment, proceed to Authenticate and manage a session to initialize the SDK and complete authentication.

Add SDK dependencies

Add the following dependencies to your application module's build.gradle:

dependencies {
    implementation 'io.openim:android-sdk:<android-sdk-version>@aar'
    implementation 'io.openim:core-sdk:<core-sdk-version>@aar'
    implementation 'com.google.code.gson:gson:<gson-version>'
}

Replace the placeholders with matching dependency versions from the official SDK release notes. Do not mix Android SDK wrapper layers with Core AAR binaries from different release tags. For team projects, commit your resolved dependency locks to avoid version drift.

Configure the manifest

Declare network permissions in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Next steps