Firebase.Messaging.FirebaseMessage

Data structure used to send messages to, and receive messages from, cloud messaging.

Summary

Inheritance

Inherits from: SystemIDisposable

Constructors and Destructors

FirebaseMessage()
Initialize the message.

Properties

CollapseKey
string
Gets the collapse key used for collapsible messages.
Data
global::System.Collections.Generic.IDictionary< string, string >
Gets or sets the metadata, including all original key/value pairs.
Error
string
Gets the error code.
ErrorDescription
string
Gets the human readable details about the error.
From
string
Gets the authenticated ID of the sender.
MessageId
string
Gets or sets the message ID.
MessageType
string
Gets the message type, equivalent with a content-type.
Notification
Optional notification to show.
NotificationOpened
bool
Gets a flag indicating whether this message was opened by tapping a notification in the OS system tray.
Priority
string
Gets the priority level.
RawData
string
Gets the binary payload.
TimeToLive
System.TimeSpan
The Time To Live (TTL) for the message.
To
string
Gets or sets recipient of a message.

Public functions

Dispose()
void

Properties

CollapseKey

string CollapseKey

Gets the collapse key used for collapsible messages.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

Data

global::System.Collections.Generic.IDictionary< string, string > Data

Gets or sets the metadata, including all original key/value pairs.

Includes some of the HTTP headers used when sending the message. gcm, google and goog prefixes are reserved for internal use.

This field is used for both upstream messages sent with firebase::messaging::Send() and downstream messages received through the FirebaseMessaging.MessageReceived event.

Error

string Error

Gets the error code.

Used in "nack" messages for CCS, and in responses from the server. See the CCS specification for the externally-supported list.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

ErrorDescription

string ErrorDescription

Gets the human readable details about the error.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

From

string From

Gets the authenticated ID of the sender.

This is a project number in most cases.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

MessageId

string MessageId

Gets or sets the message ID.

This can be specified by sender. Internally a hash of the message ID and other elements will be used for storage. The ID must be unique for each topic subscription - using the same ID may result in overriding the original message or duplicate delivery.

This field is used for both upstream messages sent with firebase::messaging::Send() and downstream messages received through the FirebaseMessaging.MessageReceived event.

MessageType

string MessageType

Gets the message type, equivalent with a content-type.

CCS uses "ack", "nack" for flow control and error handling. "control" is used by CCS for connection control.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

Notification

FirebaseNotification Notification

Optional notification to show.

This only set if a notification was received with this message, otherwise it is null.

This field is only used for downstream messages received through FirebaseMessaging.MessageReceived.

NotificationOpened

bool NotificationOpened

Gets a flag indicating whether this message was opened by tapping a notification in the OS system tray.

If the message was received this way this flag is set to true.

Priority

string Priority

Gets the priority level.

Defined values are "normal" and "high". By default messages are sent with normal priority.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

RawData

string RawData

Gets the binary payload.

For webpush and non-json messages, this is the body of the request entity.

This field is only used for downstream messages received through the FirebaseMessaging.MessageReceived event.

TimeToLive

System.TimeSpan TimeToLive

The Time To Live (TTL) for the message.

This field is only used for downstream messages received through FirebaseMessaging.MessageReceived().

To

string To

Gets or sets recipient of a message.

For example it can be a registration token, a topic name, a IID or project ID.

This field is used for both upstream messages sent with firebase::messaging:Send() and downstream messages received through the FirebaseMessaging.MessageReceived event. For upstream messages, PROJECT_ID@gcm.googleapis.com or the more general IID format are accepted.

Public functions

Dispose

void Dispose()

FirebaseMessage

 FirebaseMessage()

Initialize the message.

Send feedback about...

Need help? Visit our support page.