So when an event happens on the server and the user needs to know about it,
typically we send a push notification.
And with the push plugin, we can execute whatever we need to do on the device using something like:
push.on('notification', (data: any)
This works well when the app is closed, when the app is in foreground and even when
the app is in background and the user clicks the notification,
but it doesn’t do anything if the user doesn’t click the notification.
The problem: when the app is in background, if the user doesn’t click the notification and goes
back to the app, the event is never called.
I am wondering if this is the intended behaviour and we should not depend on push notifications to handle
important events or if I’m misunderstanding something.
Is there a best practice out there for Ionic2? Because I’m guessing that this is a typical scenario when the app runs with an API.
Some posts that describe the same issue: