Handle SwPush notification action without application running

Viewed 155

Using SwPush I am able to react on a push notification click like so:

this._swPush.notificationClicks.subscribe(({ action, notification }) => { });

E.g. if the user is asked to do or allow something I can use a service call here to send the selected action back to the server.

But: this only works when the application is running! If e.g. on a Windows System no browser tab currently has the application opened the action just doesn't get executed.

Am I doing something wrong? I really can't be the only one having an issue with this behavior. If I cannot rely on the method getting executed I can't use actions at all. I cannot assume that the user opens the application right before answering the notification.

1 Answers
Related