Hi everyone,
I’ve been having trouble with this.FCM.onNotification
not being triggered when receiving Push Notifications when the app is either closed, paused or in the foreground.
The notifications are received when the app is closed, but tapping on them simply takes me to the landing page of the app (I can’t read the wasTapped
property to redirect the user because onNotification
isn’t triggered).
I’m subscribing to onNotification
in app.component.ts
using the following code:
this.platform.ready().then(() => {
this.fcm.onNotification().subscribe(data => {
if (data.wasTapped) {
this.router.navigate([environment.paths.notifications]);
this.badge.clear();
} else {
this.setNotificationIndicator();
}
});
});
I’ve posted a question to SOF that has some more details, and I’ve posted to the ionic-worldwide slack channel, but nobody has been able to help me out.
Is anybody able to shed some light as to why this issue would occur?
Thanks