Skip to content

Receive notification only the app is in foreground #2815

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

Closed
GENL opened this issue Jun 22, 2020 · 2 comments
Closed

Receive notification only the app is in foreground #2815

GENL opened this issue Jun 22, 2020 · 2 comments
Labels
plugin: messaging type: documentation Improvements or additions to documentation

Comments

@GENL
Copy link

GENL commented Jun 22, 2020

I build social network and I want to update the number of likes of a post using a push notification. But I don't want the users to be disturbed each time a post is liked when the app is in background. So is there a way to tell the mobile app to receive notification only when the app is in foreground?

Thanks

@TahaTesser TahaTesser added plugin: messaging type: documentation Improvements or additions to documentation labels Jun 22, 2020
@siddhesh-tamhanekar
Copy link

siddhesh-tamhanekar commented Jul 7, 2020

you can use data message for that in which payload doesn't contain notification key. only data key is present.
as per docutmentation here

Data messages are lost when app is terminated.

@robrichardson13
Copy link

Potential fix mentioned here: #2854 (comment)

@GENL GENL closed this as completed Jul 12, 2020
@firebase firebase locked and limited conversation to collaborators Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: messaging type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants