Reputation: 979
I am using Google Firebase Cloud Messaging (FCM). The FCM send the notification icon as apps icon. I want to send dynamic icon from URL but it doesn't work. Is it possible to send dynamic notification icon?
{
"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"
}
Upvotes: 6
Views: 4831
Reputation: 12717
No. The icon you specify in the icon
parameter needs to be an image assets already present in your 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
Upvotes: 4