Ionic + phonegap 推送 - 通知图标不显示
Ioinic + phonegap push - notification icon does not show
我已经使用 this
中提到的代码尝试了几次
使用this实用程序生成的图标
推送通知初始化代码
var push = PushNotification.init({
android: {
senderID: "gcm_id",
icon: "ic_notification",
iconColor: "black"
}
});
platform/android/res
中的文件夹,都包含生成的ic_notification.png
但我的通知仍然没有显示图标。它显示空白的白色方块。
Cordova version 6.0.
Ionic version 1.7.14
android-minSdkVersion: 16
android-targetSdkVersion: 23
有人能让这个工作吗?
原来上面的设置没有问题。通知负载需要有正确的图标名称。
const gcmMessage = new gcm.Message({
priority: 'high',
notification: {
title: 'Title',
icon: 'ic_notification',
body: 'test'
}
});
我已经使用 this
中提到的代码尝试了几次使用this实用程序生成的图标
推送通知初始化代码
var push = PushNotification.init({
android: {
senderID: "gcm_id",
icon: "ic_notification",
iconColor: "black"
}
});
platform/android/res
中的文件夹,都包含生成的ic_notification.png
但我的通知仍然没有显示图标。它显示空白的白色方块。
Cordova version 6.0.
Ionic version 1.7.14
android-minSdkVersion: 16
android-targetSdkVersion: 23
有人能让这个工作吗?
原来上面的设置没有问题。通知负载需要有正确的图标名称。
const gcmMessage = new gcm.Message({
priority: 'high',
notification: {
title: 'Title',
icon: 'ic_notification',
body: 'test'
}
});