openimsdk / open-im-android-demo

IM Android
https://openim.io
94 stars 90 forks source link
chat-application im telegram

OpenIM Android Demo 💬💻

OpenIM DocsOpenIM Serveropenim-sdk-coreopen-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

Dev Setup 🛠️

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 :bookmark_tabs:

  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 :busts_in_silhouette:

Community Meetings :calendar:

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 :bookmark_tabs:.

Who are using OpenIM :eyes:

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 :page_facing_up:

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