镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[BUG] How to Keep the online stattus for the Client #635

Open

Description

@niliangwen

OpenIM Server Version

3.8.3

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

After deployment, Everything seem to OK, The andriod clinet work normal.
But several hours later, client A can't call client B online, the status of the clientB seems is online, But have to relogin to work.

Screenshots Link

No response

Activity

  1. skiffer-git commented on Feb 23, 2025

    @skiffer-git
    Contributor

    Are you referring to the issue of audio and video calls?

  2. skiffer-git commented on Feb 23, 2025

    @skiffer-git
    Contributor

    To solve this issue, you need to integrate offline push notifications into your system.

  3. niliangwen commented on Feb 25, 2025

    @niliangwen
    Author

    pls tell me how to integrate the offline push notification, thank you.

  4. dsx137 commented on Jun 30, 2026

    @dsx137
    Contributor

    For Android, offline push needs to be configured on both the OpenIM server side and the Android client side.

    1. Server side

    Configure openim-push.yml and enable one push provider, for example getui or fcm.

    For example:

    enable: fcm
    
    fcm:
      filePath: ./your-fcm-service-account.json
      authURL:

    or for GeTui:

    enable: getui
    
    getui:
      pushUrl: https://restapi.getui.com/v2/$appId
      masterSecret:
      appKey:
      intent:
      channelID:
      channelName:

    Official doc:
    https://docs.openim.io/guides/solution/offlinePush

    1. Android side

    If you use the OpenIM Android demo, switch to the corresponding push variant:

    • GetuiDebug / GetuiRelease for GeTui
    • FCMDebug / FCMRelease for Firebase FCM

    Then configure the vendor push credentials.

    Android demo config:
    https://github.com/openimsdk/open-im-android-demo/blob/main/CONFIGKEY.md

    1. If using FCM

    After getting the Firebase token on Android, call updateFcmToken:

    OIMManager.getInstance().updateFcmToken(fcmToken, expireTime, successCallback, failureCallback);

    Doc:
    https://docs.openim.io/sdks/api/third/updateFcmToken

    1. When sending the call invite/signaling message

    Make sure the message carries offlinePushInfo, for example title/desc, and make sure it is not sent as online-only or no-offline-push.

    OfflinePushInfo doc:
    https://docs.openim.io/sdks/class/message/offlinePushInfo

    Also make sure the Android signaling listener is set before login:

    OpenIMClient.getInstance().signalingManager.setSignalingListener(new OnSignalingListener() {});

    Android quickstart:
    https://docs.openim.io/sdks/quickstart/android

    LiveKit only handles the media room. Offline push is needed to wake/notify the Android app when the call invite cannot be delivered through the long connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions