evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

How to remove notifications from the multiple devices when Notification is clicked. #1050

Open bharathkuppala opened 5 years ago

bharathkuppala commented 5 years ago

Hi @evollu, we are trying to implement device group PushNotification using react-native-fcm. So far we have successfully delivered Notifications to the multiple devices. These Notifications are delivered using the firebase console. Now when the Notification is sent to the multiple devices.

  1. If a user clicks on one notification then the associated notification on the other devices should also get removed.

  2. For example: If I send any msgs to my friend in the hangouts. I will get a notification on my mobile as well as on my pc. When my friend chooses to see my msg on pc than the associated notification automatically disables on my mobile.

In order to achieve this, we used direct function FCM.removeAllDeliveredNotifications(); in componentDidMount() But no luck. Am i missing something??

please help us to solve this issue