fcm icon indicating copy to clipboard operation
fcm copied to clipboard

Setting an icon for the payload.

Open etelan opened this issue 1 year ago • 2 comments

Dear all. I have been trying to set an icon for the payload. All the resources say to put the icon in your androids res/drawable, but this is a ruby gem. Any ideas on how to get this to work?

etelan avatar May 15 '24 12:05 etelan

@etelan can you provide some more context with resources and code? Thanks

sabman avatar Aug 29 '24 14:08 sabman

@etelan you can follow up this firebase api doc: https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

You might need to use something like this:

{
   token: "token",
   android: {
       notification: {
           icon: String
        }
    }
}

icon: string

The notification's icon. Sets the notification icon to myicon for drawable resource myicon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.

erimicel avatar Sep 18 '24 13:09 erimicel