Considering the following scenario:
The app support notifications for more than 1 type, and each type matters and should be managed individually. Thus, entering a specific page as well as clicking specific notification will trigger the app to dismiss related notifications in tray.
And I'm feeling it's better to get all current notification in tray independently instead of relying on sending and tracking local notifications as it will lose tracking when the app has been killed on iOS or cleared from task manager / forced to stop on Android.
I have implement FCM.getDeliveredNotifications() for iOS 10 in my fork https://github.com/JaxGit/react-native-fcm/commit/c192fa69f24baa61dda739463b7372baf04dc4b7 , however I am not so familiar with Android and failed to achieve that for api>=23 https://github.com/JaxGit/react-native-fcm/commit/bc8b1bab816208e25f064ce75db130188650bfbf
Any thoughts? Thanks.
I don't know how to do it either...
Isn't this the Android way of getting notifications? https://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications()
I opened #597 for this - just realized that this is the same feature request. This would be very handy.
@JaxGit can you create a pull request with your updates. FCM.getDeliveredNotifications() would be a very good feature to add. Is there anything holding it back?
Is there any update on this? This is causing issues with keeping our in-app notification tray in sync with all the notifications that get delivered out of app.
yes it seems to be doable. PR will be welcomed
I just played around with Android but can't anything valuable out of PendingIntent except title and body. Anyone can offer some help?
Most helpful comment
Isn't this the Android way of getting notifications? https://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications()