-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications omitted in OSRemoteNotificationReceivedHandler and from disabled channels are restored and shown as silent notifications. #1265
Comments
Hi there For this step: Omit notification with notificationReceivedEvent?.complete(null) method What you are showing is expected behavior, if you do not want to have the message show upon re-opening the app, you can set a TTL Notifications past the TTL will not show again. Is there a specific use case you don't want them to restore at all? |
Then what for is this method if not for omitting notifications? It's just delaying the delivery.
TTL is not meant to be used like that and it will not solve this problem. I don't want to restore notification if:
Is there any method in this SDK that will ignore notification completely? I don't want to show it now or never. |
Hey @krzysztof-drobek, calling notificationReceivedEvent?.complete(null) for the received notification should not restore it and show it after starting the app again. I tried to reproduce the bug but could not do so either on Android 10 and 11. Also, channel notification disable is something handle by the Android OS, not OneSignal can you provide more information on this scenario? Maybe the notification configuration you are using on the dashboard. Thanks! |
@krzysztof-drobek Thanks for the details. I believe there are 3 different issues being described here. Let me know if I am summarying correctly. Issue 1Notification being restored after being omitted with
StatusIt seems @Jeasmine could not reproduce this and would need more information. Could you provide the imformation requested from #1265 (comment) ? Issue 2Notifications being restored for a disabled Notification channel after restarting the app.
StatusI don't think we tried to reproduce this one yet. It seems like this could be a possible bug with this SDK. Issue 3User disabled notifications with system settings and turned them back on later. Right now all notifications received during disabled time are restored. StatusI don't think we tried to reproduce this one yet either, similar to issue 2 but the SDK will need to check a different setting. |
I can't reproduce the first issue as well. It must have been conected with the other two. |
Sorry If it was not clear. Channel and application notification disabling was tested too, and could not reproduce the bug. In-app message handling is separate from notification, so there should not be a conflict there. |
The demo app has foreground notifications disabled with I've run your demo app without
screencapture-1615481233418_HupmidMS.mp4On a side note your demo app never uses app id stored in |
@krzysztof-drobek Thanks for the video. That is very helpful! I will try again to reproduce it again. |
I was able to reproduce with those steps; I see the problem. We will be working on fixing this for the next release. Thanks again! |
The fix has been included under https://github.com/OneSignal/OneSignal-Android-SDK/releases/tag/4.3.0 |
Description:
Notifications omitted in OSRemoteNotificationReceivedHandler and from disabled channels are restored and shown as silent notifications.
Environment
OneSignal SDK: 4.1.0
Android version: 11.0
Steps to Reproduce Issue:
Omitted notifications:
Channels:
Expectations
Omitted notifications are not restored upon app restart
Notifications from disabled channels are not restored upon app restart
The text was updated successfully, but these errors were encountered: