I use firebase to push notification, it's work fine but have two problems in my app:
That is my code:
// android settings
notification.android.setColor(theme.primaryBackground);
notification.android.setColorized(true);
notification.android.setOngoing(true);
notification.android.setPriority(
firebase.notifications.Android.Priority.High
);
notification.android.setSmallIcon('subiz_icon');
notification.android.setVibrate([1000, 1000, 1000, 1000, 1000]);
notification.android.setLights(0xff00ff00, 3000, 3000);
notification.android.setChannelId('notification');
notification.android.setAutoCancel(true);
return firebase.notifications().displayNotification(notification);
Welcome @hoangvuanhdevelopervn 馃帀
You can call either of these to cancel a ongoing notification: https://rnfirebase.io/docs/v4.3.x/notifications/reference/Notifications#cancelNotification or https://rnfirebase.io/docs/v4.3.x/notifications/reference/Notifications#cancelAllNotifications
Additionally you can use the new functionality to cancel notifications by a tag:, see this PR that implemented it as it's currently still undocumented: https://github.com/invertase/react-native-firebase/pull/1058
Loving react-native-firebase
and the support we provide? Please consider supporting us with any of the below:
React Native Firebase
and Invertase
on Twitter @Salakar I tried it and cancelNotifications
didn't removed it...
@sidferreira use removeDeliveredNotification
it's working for me
removeDeliveredNotification
is not working for me on react-native: 0.57.7 and firebase 4.3.8
Only removeAllDeliveredNotifications
works
removeDeliveredNotification
and removeAllDeliveredNotifications
working for me
@cuongtora1996 What version of firebase have you tried it on?
@LorandP firebase: 6.4.1
any update?
any update ?
im using "react-native-firebase": "^5.6.0", and "react-native": "0.61.5",
but removeDeliveredNotification isn't work for me !
i also set .android.setAutoCancel(true) but it didn't help !
plz help me
removeDeliveredNotification
andremoveAllDeliveredNotifications
working for me
Hi. I am struggling with removeDelieveredNotification(). It requires array of identifiers to remove the specific notification. What did you write for identifiers, I am still not understanding
Most helpful comment
@sidferreira use
removeDeliveredNotification
it's working for me