点击推送通知不会导航到离子应用程序中的所需页面

时间:2018-03-23 20:20:04

标签: ionic3 cordova-plugin-fcm

当应用在后台时点击设备托盘上的通知提醒后,我的应用无法导航到特定页面。

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.
    }
});

提前感谢您的帮助。

0 个答案:

没有答案