I've been trying to group notifications by an id to have them displayed as WhatsApp for example, without having one notification per line.
Adding setGroup in either onNotification or onNotificationDisplayed seems to have no effect see examples below:
1
componentDidMount() {
this.notificationListener = firebase.notifications().onNotification(async (notification) => {
// Process your notification as required
notification.android.setAutoCancel(true)
notification.android.setGroup(notification.data.channelId)
notification.android.setGroupSummary(true)
}
}
2
componentDidMount() {
this.notificationDisplayedListener = firebase.notifications().onNotificationDisplayed((notification) => {
notification.android.setGroup(notification.data.channelId)
notification.android.setGroupSummary(true)
});
}
Any idea how can I group them by id?