So in my flutter application i am sending notifications from my Golang Backend service using OneSignal REST API. In my app there are groups where people are chatting and those notifications i am sending. Now i want to implement two things
- Clear all notifications of a group or thread when any one notification of the group is clicked.
- Clear all notifications of the group if that group is opened directly and not from notification bar
now to implement this i am not being able to find the right sources. OneSignal's CANCEL MESSAGE endpoint does not seem to be too helpful here , neither am i able to fully understand how exactly to implement OneSignal's Mobile SDK's removeGroupedNotifications function. So i wanted help in implementing these two features, if anyone has any experience in implementing these?
So in my flutter application i am sending notifications from my Golang Backend service using OneSignal REST API. In my app there are groups where people are chatting and those notifications i am sending. Now i want to implement two things
- Clear all notifications of a group or thread when any one notification of the group is clicked.
- Clear all notifications of the group if that group is opened directly and not from notification bar
now to implement this i am not being able to find the right sources. OneSignal's CANCEL MESSAGE endpoint does not seem to be too helpful here , neither am i able to fully understand how exactly to implement OneSignal's Mobile SDK's removeGroupedNotifications function. So i wanted help in implementing these two features, if anyone has any experience in implementing these?
Share Improve this question asked Feb 8 at 7:17 ghosh_joyghosh_joy 1,1011 gold badge8 silver badges15 bronze badges1 Answer
Reset to default 0Well,
- A notification is clicked -> Use
removeGroupedNotifications(groupKey)
- The group is opened directly -> Call
removeGroupedNotifications(groupKey)
- Remove all notifications (if not using groups) -> Use
clearAll()
And, OneSignal REST API doesn't support clearing delivered notifications, use OneSignal's Mobile SDK for instant removal.