图标未在推送通知中显示

时间:2019-09-20 12:21:34

标签: push-notification phonegap-plugins

我是新来的推送通知。我正在使用ionic v3。当应用在后台运行时,图标不会收到通知。

            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));

        });

0 个答案:

没有答案