ios中logo的角标没办法清除,安卓中logo没有角标
- 插件版本:2.2.13
- react-native 版本:0.57.3
你好,我在componentWillUnmount方法中使用了demo中的方法 //清除所有推送通知 JPushModule.clearLocalNotifications(); JPushModule.clearAllNotifications(); JPushModule.removeReceiveCustomMsgListener(this.receiveCustomMsgListener) JPushModule.removeReceiveNotificationListener(this.receiveNotificationListener) JPushModule.removeReceiveOpenNotificationListener(this.openNotificationListener)
目前情况是 ios中的logo数量角标没办法清除,安卓中是logo没有角标数字
确定 componentWillUnmount 执行了吗?
我应用都关闭了,应该是执行了啊
@lhh-sofy 试试这个:
if (state === 'active') { JPushModule.clearAllNotifications() }
Android角标需要自己定制,可以参照社区总结
@lhh-sofy 试试这个:
if (state === 'active') { JPushModule.clearAllNotifications() }
你看我发的问题,这个也是不能使用的,都清除不了
使用JPushModule.setBadge(0, success => {}) 照样清除不了ios中的logo角标,希望你们可以排查一下。。。。非常感谢》。
有没有先调用 initPush 这个方法?
initPush这个是安卓的方法,调用了。。
iOS 偶现无法清除,调用方法
JPushModule.setBadge(0, success => {})
"jpush-react-native": "^2.5.0",
JPushModule.setBadge(ret.MyCount, success => {
JPushModule.getBadge(badge => {
console.log('JPushModuleGetBadge', badge);
});
});```
自己服务器维护了一个消息数量,我在页面中调用setBadge和getBadge都成功的回调了,但是app应用并没有出现角标。
我知道了,刚才用的模拟器测试,真机是可以实现的
ios: 13.1
componentDidMount() {
JPush.init();
JPush.setBadge({ badge: 0 });
...
}
ios角標無法清除
请问你们怎么解决的 我也有这个问题,望指教
JPush.setBadge({ badge: 0 })失效
有人解决吗?