openimsdk / openim-sdk-core

Instant Messaging
https://openim.io
Apache License 2.0
343 stars 310 forks source link

What may be the reason why onRecvOfflineNewMessages cannot be used to listen to messages when running in the background in uniapp demo? #679

Closed 0915416855 closed 1 week ago

0915416855 commented 2 weeks ago

What would you like to share?

在uniapp demo 中 app.vue文件中 app进入后台运行时 , setGlobalIMlistener()方法中使用onRecvOfflineNewMessages并没有监听到消息(安卓) const newRecvOfflineNewMessages = ({ data }) => { console.log('离线信息监听'); // data.forEach(this.handleNewMessage); }; IMSDK.subscribe(IMSDK.IMEvents.OnRecvOfflineNewMessages, newRecvOfflineNewMessages);

Additional information

No response

FGadvancer commented 2 weeks ago

This appears to be a bug. Could you please tell me the version of your core SDK so that we can fix it as soon as possible?

0915416855 commented 1 week ago

"dependencies": { "date-fns": "^2.30.0", "dayjs": "^1.11.6", "image-tools": "^1.4.0", "jsencrypt": "^3.3.2", "md5": "^2.3.0", "open-im-sdk": "^3.5.2", "openim-uniapp-polyfill": "^1.3.0", "uuid": "^9.0.0" },核心版本为3,.5.2

OpenIM-Robot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


"dependencies": { "date-fns": "^2.30.0", "dayjs": "^1.11.6", "image-tools": "^1.4.0", "jsencrypt": "^3.3.2", "md5": "^2.3.0", "open-im-sdk": "^3.5.2", "openim-uniapp-polyfill": "^1.3.0", "uuid": "^9.0.0" }, the core version is 3,.5.2