如何更改离子2中推送通知的图标/徽标

时间:2017-03-31 12:03:19

标签: angular ionic-framework push-notification ionic2 push

我能够收到推送通知,下面是我用

编写的代码
 let push = Push.init({
        android: {
            senderID: '907xxxxx860',
            icon: 'icon'
        },
        ios: {
            alert: 'true',
            badge: true,
            sound: 'false'
        },
        windows: {}
      });

我正在Android 5中测试。

在我的资源文件夹中,我在此路径中有一个图像assets/images/home/KmartLogo.png。我希望这个图像作为我的Android徽标。

我怎样才能做到这一点。根据此文档doc我正在尝试将icon: 'icon'中的路径添加到此icon:assets/images/home/KmartLogo.png中,但它无法正常工作如何更改我的徽标

更新通知图片我收到img

1 个答案:

答案 0 :(得分:0)

icon名称不应包含扩展程序

Doc

  

用作小图标的可绘制资源的名称。名字   不应包括扩展名。

android: {
            senderID: '907xxxxx860',
            icon: './assets/images/home/KmartLogo'
        },