THE SITUATION:
I need to send push notifications to a certain group of user.
When the first user of this group perform a certain action (click on the button inside the notification), I need to remove the notification from all the other users' devices.
NOTES:
I am using Quasar as hybrid framework and Laravel for server API. I use oneSignal to send push notifications with php cURL requests.
As device OS I am focusing now on Android, but ideally I am looking for a way to achieve this in both Android and IOS.
ATTEMPTS:
At the moment I send the notification with the notification_id as a payload. When the user click on the button, it trigger a callback that send the notification_id back to server. Until here no problem.
I have the id of the notification that need to be removed from the other devices.
But now I don't know how to remove it, from the server.
OneSignal has a cancel method, but it applies only for scheduled notifications (not sent). If I try to apply that method to a sent notification it gives the error: Notification has already been sent to all recipients
.
THE QUESTION:
Is it possible to remove a push notification, from the server, after it has been sent?
If not, what do you suggest as an alternative to implement that behavior?