Skip to content
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

Receive notification only the app is in foreground #62

Open
GENL opened this issue Jun 22, 2020 · 1 comment
Open

Receive notification only the app is in foreground #62

GENL opened this issue Jun 22, 2020 · 1 comment

Comments

@GENL
Copy link

GENL commented Jun 22, 2020

I build a mobile 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

@butaminas
Copy link

You can set how these notifications are handled in your app code. You can trigger an event when a push notification is received and decide what you do with it - this is where you check if the app is in the foreground or not and only then display the notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants