NotificationPayload interface
Stay organized with collections
Save and categorize content based on your preferences.
Display notification details. Details are sent through the Send API.
Signature:
export interface NotificationPayload
Properties
Property |
Type |
Description |
body |
string |
The notification's body text. |
icon |
string |
The URL to use for the notification's icon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest. |
image |
string |
The URL of an image that is downloaded on the device and displayed in the notification. |
title |
string |
The notification's title. |
NotificationPayload.body
The notification's body text.
Signature:
body?: string;
NotificationPayload.icon
The URL to use for the notification's icon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.
Signature:
icon?: string;
NotificationPayload.image
The URL of an image that is downloaded on the device and displayed in the notification.
Signature:
image?: string;
NotificationPayload.title
The notification's title.
Signature:
title?: string;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-07-20 UTC.
[null,null,["Last updated 2023-07-20 UTC."],[],[],null,["Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification).\n\n**Signature:** \n\n export interface NotificationPayload \n\nProperties\n\nNotificationPayload.body\n\nThe notification's body text.\n\n**Signature:** \n\n body?: string;\n\nNotificationPayload.icon\n\nThe URL to use for the notification's icon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.\n\n**Signature:** \n\n icon?: string;\n\nNotificationPayload.image\n\nThe URL of an image that is downloaded on the device and displayed in the notification.\n\n**Signature:** \n\n image?: string;\n\nNotificationPayload.title\n\nThe notification's title.\n\n**Signature:** \n\n title?: string;"]]