question

Daniel González avatar image
Daniel González asked

Changing icon for Push Notification templates.

With the addition of the Push Notifications Templates feature, we lost the ability to send notifications from the developer console with custom icons.

This is quite inconvenient to us, because of the Android requirement of having tranparent icons and not being able to change them.

Is there any way to define the icon parameter in the advanced json payload?

Push Notificationsdocumentation
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Daniel González avatar image
Daniel González answered

I added this to the Payload section (an empty one for iOS was required)

Androd payload:

{
  "notification": {
    "icon": "ic_push"
  }
}

iOS payload:

{
  "aps": {}
}
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JayZuo avatar image
JayZuo answered

I'm not familiar with Android Push Notification. But as the help in Push Notification Templates showed:

Advanced payloads allow you to use platform specific fields to delight your users. These features are only possible if you are on the latest playfab push notification format version.

Android payload
The Android payload consists of two key-value pairs, "notification" and "data". The "notification" key-value should contain the predefined key-value pairs of the android notification payload and "data" is an object that you can put your custom data into. Both keys are further explained in the Firebase Cloud Messaging HTTP Protocol.
I'd think you can try with icon parameter in notification payload to set the icon for Android.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.