Closed musicode closed 6 years ago
顺便再问个问题,如果手机收到多条通知,点击其中一条,怎样让其他通知一起消失呢
@Jeepeng 拜托拜托
@Jeepeng 我用两个华为 mate9 测试,当 app 处于后台时,一个能收到通知,一个收不到,但是当 app 处于前台时,两个手机都能收到,请问这是为什么啊
通过notification.clicked === true
来判断是否点击通知了
XGPush.addEventListener('notification', this._onNotification);
_onNotification(notification) {
if(notification.clicked === true) {
alert('点击通知' + JSON.stringify(notification));
} else {
alert('app处于前台时收到通知' + JSON.stringify(notification));
}
}
目前信鸽没有提供让通知消失的 API
好的,谢谢。
今天会发新版么
今天晚上
好的,谢谢,我这目前就发现两个相同系统版本的华为 mate9,一个正常,一个后台接收不到通知,其他没啥问题
都是 android 8,targetSdk 版本我改成了 25
我是通过附加参数来判断点击通知后跳转到哪个页面。
当 app 处于后台时,能收到通知,但是 当打开 app 时 onNotification 不会被触发,app 在前台的时候是可以的。请问这个怎么处理?
如题