You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing the code of the openim project, I came across a detail in the message push logic that piqued my interest. In the pushToUser function, there is a specific check for the "background state" of iOS platform clients. If an iOS client is in the background, it is treated as offline, even if it has an active network connection, and offline push is performed. However, it seems that no such check is implemented for Android clients.
Here are my queries:
Why is there a need for a separate "background state" check for iOS devices, while Android devices do not have this logic?
What is the rationale behind this design decision? Is it related to the system characteristics or push notification mechanisms of iOS and Android?
Are there any considerations that might have been overlooked or areas that could be optimized? For instance, should Android clients also be checked for their background state?
I understand that this might be a deliberate design choice based on the behavior or privacy policies of specific platforms, but I would like to gain a deeper understanding of the background and reasoning.
Your response and clarification on this matter would be greatly appreciated.
During our debugging, we found that when the Android app is in the background or closed, the push logic still considers the device to be online, and the push function executes successfully, but the message is not actually delivered to the app. Does this mean we need to adjust our push logic to ensure effective message delivery on Android devices?
What would you like to share?
Description:
Dear Development Team,
While reviewing the code of the
openim
project, I came across a detail in the message push logic that piqued my interest. In thepushToUser
function, there is a specific check for the "background state" of iOS platform clients. If an iOS client is in the background, it is treated as offline, even if it has an active network connection, and offline push is performed. However, it seems that no such check is implemented for Android clients.Here are my queries:
I understand that this might be a deliberate design choice based on the behavior or privacy policies of specific platforms, but I would like to gain a deeper understanding of the background and reasoning.
Your response and clarification on this matter would be greatly appreciated.
Thank you for your attention to this issue.
Best regards,
Libo
Additional information
(中文版)
标题:关于 iOS 后台状态检查与 Android 平台差异的问题
描述:
尊敬的开发者团队,
我在审查
openim
项目的代码时,注意到了一个关于消息推送逻辑的细节,这引起了我的关注。在pushToUser
函数中,对于 iOS 平台的客户端,代码特别检查了“是否在后台”的状态,如果客户端在后台,即使有网络连接,也会被视为不在线,并执行离线推送。然而,对于 Android 平台,似乎并没有进行类似的检查。我的疑问是:
我理解这可能是基于特定平台的行为或用户隐私政策,但我希望了解更详细的背景信息和设计考量。如果这是一个有意为之的设计选择,了解其原因将有助于我更好地理解整个系统的工作原理。
期待您的回复和澄清,谢谢!
The text was updated successfully, but these errors were encountered: