后台通知:
指的集成了融云 sdk 的 app 切换到后台收不到消息通知栏弹出的通知提醒
可能造成后台通知不展示的原因
1 用户信息提供者没有实现
RongNotificationManager 类 onReceiveMessageFromApp if (userInfo != null)
2 应用进程前后台判断不准确
MessageNotificationManager 类 notify 方法 isInBackground
3 通知依赖的 rc_lib_string.xml 【IMLib】的字符串资源文件缺失
以上三点 1 3 为高发情况 2 为 低发情况,其他情况出现概率更低,可 debug 断点跟踪代码。
自定义消息不弹通知的原因
自定义消息不弹通知,正常的内置消息弹通知的情况是因为开发者没有对自定义消息做 MessageProvider 消息 UI 模板注册,检查代码
RongNotificationManager 类 onReceiveMessageFromApp 方法
if (provider == null)
return;