当应用在后台时点击设备托盘上的通知提醒后,我的应用无法导航到特定页面。
this.fcm.onNotification().subscribe( data => {
if (data.wasTapped) {
// Notification was received on device tray and tapped by the user.
this.postId = parseInt(data.id);
this.nav.push(PostDetailsRel1Page, {
item: this.postId
});
} else {
// Notification was received in foreground. Maybe the user needs to be notified.
}
});
提前感谢您的帮助。