-
Notifications
You must be signed in to change notification settings - Fork 766
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
Unable to prevent data-only Background notifications from displaying a notification (Android) #684
Comments
I couldn't find clarity on this myself, and since I built our backend push sending service a couple of years ago I wondered if it was sending stuff in a way that was triggering these incorrectly. However I've since switched over to react-native-firebase which is handling them as expected (ie. not displaying anything) so I'm happy there's no issue there. So while this is not closed as far as understanding why it was happening, it's closed for me as I'm not longer using this module. I'll just leave this in case anyone else has the problem and someone else can clarify for them. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
not stale, Having the same issue |
I have the same issue any update about this ?? |
Also the same issue, this is very problematic when using data-only notifications. e.g. setting the title to 'Hello' and the body to 'World' in the data payload will present a notification that says |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
go away stolebot |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Somebody found a solution for this? |
I'm guessing it should be a pretty easy fix to just add an if-statement on this line, to not present empty notifications? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
stalebot unstale! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The issue has been closed for inactivity. |
Using v.3.2.2 of RNN, and react-native 0.63. Didn't want to upgrade as right at the end of a build and don't want to switch version unnecessarily just yet.
We send pushes to display notifications for users, but also data-only notifications to trigger updates behind the scenes. I don't seem to be able to stop blank notifications from showing up in the notification tray. By which I mean the icon and app name, with no content (because there isn't any content to display).
I'm a little confused by a combination of the docs not mentioning much about the completion callback, and another Github issue that suggested the completion function is not correctly documented, so I might be missing something, or misusing that somehow...
The notification payload arriving via FCM looks like this:
And my listener looks something like this:
This is all going fine in the foreground, and the background notifications I do want to display are ok too. I'm just probably missing something obvious about how to handle (in my case ignore) these "hidden" pushes in the background. If anyone can point to my mistake or misunderstanding I'd be very grateful.
The text was updated successfully, but these errors were encountered: