Я новичок с push-уведомлениями.Я использую ionic v3. Icon не приходит уведомление, когда приложение работает в фоновом режиме.
const options: PushOptions = {
android: {
senderID: '*******',
sound: true,
forceShow: true,
vibrate: true,
icon:'ic_stat_image',
iconColor: 'color',
},
ios: {
alert: 'true',
badge: true,
sound: 'false',
},
};
console.log("Before obj");
const pushObject: PushObject = this.push.init(options);
pushObject.on('notification').subscribe((notification: any) => console.log('Received a notification', notification));
pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration));
pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
});