No way to clear any existing notifications.
Both
Application Target Platform:
Windows 10
Development Operating System:
iOS and Android
Build Tools:
27.0.3
React Native version:
0.54.3
RNFirebase Version:
4.0.0
Firebase Module:
Firebase notifications
Assuming this is a delivered notification, you can use firebase.notifications().removeDeliveredNotification(notificationId)
or firebase.notifications().removeAllDeliveredNotifications()
. If it's a scheduled notification, you can use firebase.notifications().cancelNotification(notificationId)
or firebase.notifications().cancelAllNotifications()
.
All this is documented at: https://rnfirebase.io/docs/v4.0.x/notifications/reference/Notifications
@chrisbianca Thank you, I seem to have missed that
Assuming this is a delivered notification, you can use
firebase.notifications().removeDeliveredNotification(notificationId)
orfirebase.notifications().removeAllDeliveredNotifications()
. If it's a scheduled notification, you can usefirebase.notifications().cancelNotification(notificationId)
orfirebase.notifications().cancelAllNotifications()
.All this is documented at: https://rnfirebase.io/docs/v4.0.x/notifications/reference/Notifications
firebase.notifications().removeDeliveredNotification(notificationId)
is not working for me on react-native: 0.57.7 and firebase 4.3.8
Same problen.
"react-native": "0.57.1",
"react-native-firebase": "^5.0.0-rc4",
Also seem to be having this issue.
react-native: 0.57.7
react-native-firebase: 5.2.2
I don't see any particular notes about this feature in the changelog since 5.2.2. Is this something known to be fixed?
Also seem to be having this issue.
react-native: 0.57.7
react-native-firebase: 5.2.2I don't see any particular notes about this feature in the changelog since 5.2.2. Is this something known to be fixed?
Hi @agmcleod I was also facing the same issue I solved this issue by adding this line
firebase.notifications().cancelNotification(notifcationPayload.notification._notificationId)
.
react-native : 0.60.5
react-native-firebase: 5.5.6
Any way to clear remote notifications in react native firebase v6???
@aravi365 I was clear in my answer on #3563 I think.
Integrate a package that handles local device notification APIs
Most helpful comment
Assuming this is a delivered notification, you can use
firebase.notifications().removeDeliveredNotification(notificationId)
orfirebase.notifications().removeAllDeliveredNotifications()
. If it's a scheduled notification, you can usefirebase.notifications().cancelNotification(notificationId)
orfirebase.notifications().cancelAllNotifications()
.All this is documented at: https://rnfirebase.io/docs/v4.0.x/notifications/reference/Notifications