I cant activate my app on notification clicking while app on background or closed
if (res.additionalData.foreground) {
let confirmAlert = this.alertCtrl.create({
title: 'New Notification',
message: res.message,
buttons: [{
text: 'Ignore',
role: 'cancel'
}, {
text: 'View',
handler: () => {
this.nav.push(ZakazitemPage, res.additionalData.order_id)
console.log("Push notification ", {message: res});
}
}]
});
confirmAlert.present();
}
else {
this.nav.push(OrderItemPage, res.additionalData.order_id)
}
whats wrong? maybe who can take me working example.