Hi guys,
I integrated push notification but I have a strange issue. Push registration event is called two times. I don’t understand why.
this.pushObject.on('registration').subscribe((registration: any) => {
alert ("Push registration");
})
this.pushObject.on('error').subscribe(error => {
alert ("Push registration failed");
});
this.push.hasPermission()
.then((res: any) => {
if (res.isEnabled) {
console.log('We have permission to send push notifications');
} else {
console.log('We do not have permission to send push notifications');
}
});
Could you please help me?
Thanks in advance
Luca