OpenIM Android Demo ๐Ÿ’ฌ๐Ÿ’ป

OpenIM Docs โ€ข OpenIM Server โ€ข openim-sdk-core โ€ข open-im-sdk-android


Demo is a set of UI components implemented based on the Open-IM SDK, which includes functionalities such as conversations, chats, relationships, and groups. The project adopts MVVM+modular development, with high decoupling, independent business logic, code separation, making it easy to integrate the functionalities you need quickly and conveniently

Tech Stack ๐Ÿ› ๏ธ

Official demo use

  • Download the experience app

    Android

Dev Setup ๐Ÿ› ๏ธ

  • Android Studio 3.6.1 or above
  • Gradle-5.1.1 or above
  • Android Gradle Plugin Version-3.4.0 or above
  • android x library

Development Configuration

minSdk     : 21
targetSdk  : 32
compileSdk : 32
abiFilters : ['armeabi-v7a', 'x86']

Build ๐Ÿš€

1.git clone๏ผš

git clone https://github.com/OpenIMSDK/Open-IM-Android-Demo.git

2.Importing the project

Place the Demo and UIkit folders in the same directory, and then import demo/app to get started

3.Configuration of modules

In the app/config.gradle file

ext {
    //Module standalone running is set to true
    isModule=false

    //android config
    androidConfig = [
            minSdk     : 21,
            targetSdk  : 32,
            compileSdk : 32,
            versionCode: 2,
            versionName: "1.0.2",
            abiFilters : ['armeabi-v7a', 'arm64-v8a']
    ]
    //The ID of the module
    applicationId = [
            "app" : "io.openim.android.demo",
            "OUIConversation" :"io.openim.android.ouiconversation",
            "OUIGroup" : "io.openim.android.ouigroup",
            "OUIContact" : "io.openim.android.ouicontact",
            "OUICalling" : "io.openim.android.ouicalling",
    ]

}

In the app/build.gradle file

    api project(':OUICore')
    if (!isModule) {
        implementation project(':OUIConversation')
        implementation project(':OUIGroup')
        implementation project(':OUIContact')
	//Disabling a module will remove all functionalities associated with that module
       //implementation project(':OUICalling')
    }

Issues ๐Ÿ“‘

  1. Reminder: If you encounter the "resource loading is not complete" error when calling SDK-related APIs, make sure to call other APIs after the login callback is executed.
  2. After disabling or adding a module, if the app shows an error toast when calling the functionalities of that module, you can resolve the issue by uninstalling and reinstalling the app.
  3. Reminder: Avoid using duplicate names for resources across different modules.
  4. Some ViewModels need to be globally shared. Developers should pay attention to whether ViewModels are cached in viewModels and release them in a timely manner when they are no longer in use to avoid memory leaks.

Community ๐Ÿ‘ฅ

Community Meetings ๐Ÿ“†

We want anyone to get involved in our community and contributing code, we offer gifts and rewards, and we welcome you to join us every Thursday night.

Our conference is in the OpenIM Slack ๐ŸŽฏ, then you can search the Open-IM-Server pipeline to join

We take notes of each biweekly meeting in GitHub discussions, Our historical meeting notes, as well as replays of the meetings are available at Google Docs ๐Ÿ“‘.

Who are using OpenIM ๐Ÿ‘€

Check out our user case studies page for a list of the project users. Don't hesitate to leave a ๐Ÿ“comment and share your use case.

License ๐Ÿ“„

OpenIM is licensed under the Apache 2.0 license. See LICENSE for the full license text.