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
报错:Value for nitificationId cannot be cast from String to Double
消息过来
重现步骤
监听了addNotificationListener方法
this.notificationListener = result => {
console.log('notificationListener:' + JSON.stringify(result));
console.log('notificationListener:', result);
if (
result &&
result.extras &&
result.notificationEventType === 'notificationArrived'
) {
let extras = result.extras;
switch (extras.type) {
case 'sensitive':
console.log('授权通知', extras);
this.setState(
{
authInfo: {
...extras,
isVisible_out: true,
},
},
() => {
// JPush.clearAllNotifications();
console.log('JPush.clearNotificationById', result.messageID);
//报错:Value for nitificationId cannot be cast from String to Double
JPush.clearNotificationById({notificationId: result.messageID});
},
);
break;
default:
break;
}
}
};
JPush.addNotificationListener(this.notificationListener);
Debug logs
包括 Android 或 iOS 的日志:
//报错:Value for nitificationId cannot be cast from String to Double
JPush.clearNotificationById({notificationId: result.messageID});
The text was updated successfully, but these errors were encountered:
你的运行环境
"jcore-react-native": "^2.1.9",
"jpush-react-native": "^3.0.9",
"react": "18.2.0",
"react-native": "0.72.4",
期望效果
处理消息完毕之后,把通知栏目对应的消息去掉
实际效果
报错:Value for nitificationId cannot be cast from String to Double
消息过来
重现步骤
Debug logs
包括 Android 或 iOS 的日志:
//报错:Value for nitificationId cannot be cast from String to Double
JPush.clearNotificationById({notificationId: result.messageID});
The text was updated successfully, but these errors were encountered: