wildfirechat / wfc_flutter_plugins

野火flutter插件,包含即时通讯和实时音视频插件
Other
37 stars 26 forks source link

Imclient.IMEventBus 收不到任何消息 #59

Closed liaovq closed 1 year ago

liaovq commented 1 year ago

按照文档进行了以下步骤

  1. Rtckit.init();
  2. Imclient.init(...);
  3. login
  4. Imclient.connect(...);
  5. await Imclient.getConversationInfos();
  6. final EventBus _eventBus = Imclient.IMEventBus;
  7. 注册了ConnectionStatusChanged、ReceiveMessages、UserSettingUpdated、RecallMessage等消息的监听 获取到对话列表之后,有新消息来的时候,不会走listen的回掉,请问IMEventBus是少注册了哪一步吗?目前无法收到任何消息
liaovq commented 1 year ago
Snipaste_2023-09-08_14-23-52

右侧原生的代码执行后,左侧 flutter 端的回调并没有执行,

liaovq commented 1 year ago

找到问题了,只要按照 fcm 接入的文档配置了 onBackgroundMessage 就一定收不到消息,去掉之后就好了。

image

https://firebase.google.com/docs/cloud-messaging/flutter/receive?hl=zh-cn

li460930736 commented 1 year ago

你好,我貌似遇到了跟你类似的问题,但是我是debug包正常,release包不执行回调了,请问你有发生这种情况吗?

li8607 commented 1 year ago

你好,我貌似遇到了跟你类似的问题,但是我是debug包正常,release包不执行回调了,请问你有发生这种情况吗?

遇到过,build.gradle配置不对。

imndx commented 1 year ago

https://github.com/firebase/flutterfire/issues/9689