SDKsAndroid
Integrate for Android
Add OpenIM Android SDK dependencies and network permissions to an Android project.
This page covers Android project dependencies and permissions only. For SDK initialization, connection listeners, and sign-in, see Authenticate and manage a session.
Add SDK dependencies
Add the dependencies to the 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 the dependency versions listed for the same SDK release. Do not combine the Android wrapper and Core AAR from different releases, and commit the resolved dependency lock state for team projects.
Configure the manifest
The application needs network access:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />Next steps
Was this page helpful?