- I am using phonegap-plugin-push for push notification in Ionic 3
- I received notification, but while clicking on notification I didn't get any response.
I want to redirect to a selected page while clicking on notification. Below is my code.
public pushNotification(){ const options: PushOptions = { android: { senderID: 'xxxxxxxx', icon: 'icon', sound: true, vibrate: true }, ios: { alert: true, badge: true, sound: true, } }; let isNotifyAvailable: boolean = false; const pushObject: PushObject = this.push.init(options); let me = this; pushObject.on('notification').subscribe((notification: any) => { console.log('Received a notification', notification); if (notification.additionalData.foreground) { me.utilService.showToastMsg("success", notification.message); } else { this.navCtrl.setRoot(NotificationList); } }); }
In the backend I am using FCM notification in Python.
How can I redirect in selected page when click on Notification?