最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - Remove all notifications of a group using OneSignal REST API in Android and IOS - Stack Overflow

programmeradmin1浏览0评论

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

  1. Clear all notifications of a group or thread when any one notification of the group is clicked.
  2. 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

  1. Clear all notifications of a group or thread when any one notification of the group is clicked.
  2. 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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Well,

  • 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.

发布评论

评论列表(0)

  1. 暂无评论