- phonegap-plugin-push
- Ionic Framework: 3.6.0
- Ionic App Scripts: 2.1.4
- Angular Core: 4.1.3
- Angular Compiler CLI: 4.1.3
- Node: 6.11.1
- OS Platform: Windows 10
- Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
It works perfectly when the app is open & receives notifications,It automatically redirect to specific page.But when the app is closed & I click notifications, It does not redirect to page.It only starts the app.
pushObject on Notification code
pushObject.on('notification').subscribe((notification: any) => {
console.log('Received a notification', notification);
if(notification.additionalData.type=="news"){
this.NewsAndEventsDetails(notification.additionalData.type_id);
}else if(notification.additionalData.type=="notice"){
this.getNoticesSingle(notification.additionalData.type_id);
}else if(notification.additionalData.type=="bill"){
this.getBillsSingle(notification.additionalData.type_id);
}else{
let prompt = this.alertCtrl.create({
title: notification.title,
message: notification.message
});
prompt.present();
}
});