Open epetre opened 3 years ago
Thanks for this post. Any news about the questions? These notification management use cases are quite important to handle, in my opinion...
after testing iOS I realized that all pushes are automatically cleared when tapping one of them.
@epetre, I tried it on a iOS 15.3 device, and opening a notification won't clear the other ones automatically. Is the behavior you describe related to the unsubscribeWhenNotificationsAreDisabled
function?
Did you manage to clear iOS notifications at all?
Have you found any answer to your questions 2. and 3.?
Description: I have 3 questions which I can't seem to find an answer to while looking at the documentation:
1. Why can't we clear notifications in iOS? I noticed that we can clear all notifications and notifications by id in Android, but it's mentioned it's only available for Android. What would be the recommended way to deal with this for iOS devices? Is there a good reason that it's not part of the SDK?
https://github.com/OneSignal/OneSignal-Cordova-SDK/blob/0c873a9115e8732e2040e9531470bfcbfbd49ae4/www/OneSignalPlugin.js#L188
I have read the docs and can't make sense of it, but after testing iOS I realized that all pushes are automatically cleared when tapping one of them.
Am I missing something?
Android seems to require either the notificatin ID or group ID to clear notifications unless we want to clear them all, is that the Android ID and android group id (the channels?) ?
Is there a way to get a list of all the notifications in the tray? It would be nice to clear a notification from the tray if a user goes directly in the app to the content they needed to see and we'd be able to clear that push for them.