Notification(const Notification & other)
~Notification()
Public attributes | |
---|---|
android | Parameters that are unique to the Android implementation. |
badge | std::string Indicates the badge on the client app home icon. iOS and tvOS only. |
body | std::string Indicates notification body text. |
body_loc_args | std::vector< std::string > Indicates the string value to replace format specifiers in body string for localization. |
body_loc_key | std::string Indicates the key to the body string for localization. |
click_action | std::string The action associated with a user click on the notification. |
color | std::string Indicates color of the icon, expressed in #rrggbb format. Android only. |
icon | std::string Indicates notification icon. |
sound | std::string Indicates a sound to play when the device receives the notification. |
tag | std::string Indicates whether each notification results in a new entry in the notification drawer on Android. |
title | std::string Indicates notification title. |
title_loc_args | std::vector< std::string > Indicates the string value to replace format specifiers in title string for localization. |
title_loc_key | std::string Indicates the key to the title string for localization. |
Public functions | |
---|---|
operator=(const Notification & other) | Copy assignment operator. Makes a deep copy of this Message. |
AndroidNotificationParams*firebase::messaging::Notification::android
Parameters that are unique to the Android implementation.
std::stringfirebase::messaging::Notification::badge
Indicates the badge on the client app home icon. iOS and tvOS only.
std::stringfirebase::messaging::Notification::body
Indicates notification body text.
std::vector<std::string>firebase::messaging::Notification::body_loc_args
Indicates the string value to replace format specifiers in body string for localization.
On iOS and tvOS, this corresponds to "loc-args" in APNS payload.
On Android, these are the format arguments for the string resource. For more information, see Formatting strings.
std::stringfirebase::messaging::Notification::body_loc_key
Indicates the key to the body string for localization.
On iOS and tvOS, this corresponds to "loc-key" in APNS payload.
On Android, use the key in the app's string resources when populating this value.
std::stringfirebase::messaging::Notification::click_action
The action associated with a user click on the notification.
On Android, if this is set, an activity with a matching intent filter is launched when user clicks the notification.
If set on iOS or tvOS, corresponds to category in APNS payload.
std::stringfirebase::messaging::Notification::color
Indicates color of the icon, expressed in #rrggbb format. Android only.
std::stringfirebase::messaging::Notification::icon
Indicates notification icon.
Sets value to myicon for drawable resource myicon.
std::stringfirebase::messaging::Notification::sound
Indicates a sound to play when the device receives the notification.
Supports default, or the filename of a sound resource bundled in the app.
Android sound files must reside in /res/raw/, while iOS and tvOS sound files can be in the main bundle of the client app or in the Library/Sounds folder of the app’s data container.
std::stringfirebase::messaging::Notification::tag
Indicates whether each notification results in a new entry in the notification drawer on Android.
If not set, each request creates a new notification. If set, and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.
std::stringfirebase::messaging::Notification::title
Indicates notification title.
This field is not visible on tvOS, iOS phones and tablets.
std::vector<std::string>firebase::messaging::Notification::title_loc_args
Indicates the string value to replace format specifiers in title string for localization.
On iOS and tvOS, this corresponds to "title-loc-args" in APNS payload.
On Android, these are the format arguments for the string resource. For more information, see Formatting strings.
std::stringfirebase::messaging::Notification::title_loc_key
Indicates the key to the title string for localization.
On iOS and tvOS, this corresponds to "title-loc-key" in APNS payload.
On Android, use the key in the app's string resources when populating this value.
firebase::messaging::Notification::Notification()
firebase::messaging::Notification::Notification(constNotification&other)
Copy constructor. Makes a deep copy of this Message.
Notification&firebase::messaging::Notification::operator=(constNotification&other)
Copy assignment operator. Makes a deep copy of this Message.
firebase::messaging::Notification::~Notification()
Destructor.
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 2024-01-23 UTC.