我正在使用 Google Firebase 云消息传递 (FCM)。 FCM 将通知图标作为应用程序图标发送。我想从 URL 发送动态图标,但它不起作用。是否可以发送动态通知图标?
{
"notification":{
"title":"App Title",
"body":"descriptions",
"icon":"http://example.com/abc.png",
"click_action":"FCM_PLUGIN_ACTIVITY"
},
"data":{
"state":"contact",
"param2":"value2"
},
"to":"/topics/all",
"priority":"high"
}
最佳答案
没有。您在 icon
参数中指定的图标需要是已存在于您的 APK 中的图像资源。
icon Sets the notification icon to
myicon
for drawable resourcemyicon
. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.
https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support
关于android - Firebase 云消息传递的动态通知图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43303218/