I might need a bit of help here.
I want to add support for Push Notifications for mobile devices, so that you can get a bleep on your phone if someone tries to message you in game, or something else that you wish to know. We have local notifications, but they mainly just work on desktop.
I want to add notifications using push services.
I know the gist of how it is done, reading articles like:
But. One thing I still can’t answer is;
How do I prevent notifications when you have the PWA app open?
- Does the browser ignore push by itself, if the app is in focus?
- If not 1) , then do I need to tell the server every time you focus/unfocus the app, so I know only to send notifications when not focused?
And also - anyone else here with experience making using push services, in case I end up with questions?