在 ionic 推送通知中,我们可以在“android”数组中添加“icon”:“xxxxx”来更改新的(小)图标路径,
var push = new Ionic.Push({
"debug": true,
"pluginConfig": {
"android": {
"iconColor": "#343434",
"icon": "abc"
}
}
});
其中 abc.png 来自 platform/android/res/drawable 文件夹。
但是有什么方法可以改变推送的大图标吗?因为 iconColor 是有效的,但我测试了很多次,所以我无法将彩色背景更改为大图像。
任何人都可以帮助我..谢谢!!
最佳答案
您可以将 image
属性添加到 android
对象,该对象是一个字符串,描述对 drawables
文件夹中图像的引用, Assets URI 或远程 URL。尽管 Ionic Push 并未将自己列为支持此属性,但实际测试验证了这一点。
更多信息:https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#images
关于android - 如何在 ionic.io 中设置大图 - 推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33644143/