Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Networking.HTTP.Firebase.NotificationOptions Class Reference

Notification options More...

Public Member Functions

 NotificationOptions ()
 Notification options More...
 
void SetProperties (Dictionary< string, object > Message, FirebaseClient Client)
 Prepares the object to send to Firebase. More...
 
bool TrySetProperty (string Name, object Value)
 Tries to set a property value. More...
 

Properties

string Condition [get, set]
 This parameter specifies a logical expression of conditions that determines the message target. More...
 
string MessageId [get, set]
 This parameter uniquely identifies a message in an XMPP connection. More...
 
string CollapseKey [get, set]
 This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed so that only the last message gets sent when delivery is resumed. This is intended to avoid sending too many of the same messages when the device comes back online or comes out of doze. More...
 
NotificationPriority Priority [get, set]
 Sets the priority of the message. Valid values are "normal" and "high." On Apple platforms, these correspond to APNs priorities 5 and 10. More...
 
bool ContentAvailable [get, set]
 On Apple platforms, use this field to represent content-available in the APNs payload. When a notification or message is sent and this is set to true, an inactive client app is awoken, and the message is sent through APNs as a silent notification and not through FCM. Note that silent notifications in APNs are not guaranteed to be delivered, and can depend on factors such as the user turning on Low Power Mode, force quitting the app, etc. On Android, data messages wake the app by default. On Chrome, currently not supported. More...
 
bool MutableContent [get, set]
 On Apple platforms, use this field to represent mutable-content in the APNs payload. When a notification is sent and this is set to true, the content of the notification can be modified before it is displayed, using a Notification Service app extension. This parameter will be ignored for Android and web. More...
 
bool DryRun [get, set]
 This parameter, when set to true, allows developers to test a request without actually sending a message. More...
 
int TimeToLive [get, set]
 This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ NotificationOptions()

Waher.Networking.HTTP.Firebase.NotificationOptions.NotificationOptions ( )

Notification options

Definition at line 16 of file NotificationOptions.cs.

Member Function Documentation

◆ SetProperties()

void Waher.Networking.HTTP.Firebase.NotificationOptions.SetProperties ( Dictionary< string, object >  Message,
FirebaseClient  Client 
)

Prepares the object to send to Firebase.

Parameters
MessageMessage object being constructed.
ClientClient sending notification

Definition at line 81 of file NotificationOptions.cs.

◆ TrySetProperty()

bool Waher.Networking.HTTP.Firebase.NotificationOptions.TrySetProperty ( string  Name,
object  Value 
)

Tries to set a property value.

Parameters
NameName
ValueValue
Returns
If successful or not.

Definition at line 114 of file NotificationOptions.cs.

Property Documentation

◆ CollapseKey

string Waher.Networking.HTTP.Firebase.NotificationOptions.CollapseKey
getset

This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed so that only the last message gets sent when delivery is resumed. This is intended to avoid sending too many of the same messages when the device comes back online or comes out of doze.

There is no guarantee of the order in which messages get sent.

Note: A maximum of 4 different collapse keys is allowed at any given time.This means FCM can simultaneously store 4 different messages per client app.If you exceed this number, there is no guarantee which 4 collapse keys FCM will keep.

Definition at line 43 of file NotificationOptions.cs.

◆ Condition

string Waher.Networking.HTTP.Firebase.NotificationOptions.Condition
getset

This parameter specifies a logical expression of conditions that determines the message target.

Supported condition: Topic, formatted as "'yourTopic' in topics". This value is case-insensitive.

Supported operators: &&, ||. Maximum two operators per topic message supported.

Definition at line 29 of file NotificationOptions.cs.

◆ ContentAvailable

bool Waher.Networking.HTTP.Firebase.NotificationOptions.ContentAvailable
getset

On Apple platforms, use this field to represent content-available in the APNs payload. When a notification or message is sent and this is set to true, an inactive client app is awoken, and the message is sent through APNs as a silent notification and not through FCM. Note that silent notifications in APNs are not guaranteed to be delivered, and can depend on factors such as the user turning on Low Power Mode, force quitting the app, etc. On Android, data messages wake the app by default. On Chrome, currently not supported.

Definition at line 57 of file NotificationOptions.cs.

◆ DryRun

bool Waher.Networking.HTTP.Firebase.NotificationOptions.DryRun
getset

This parameter, when set to true, allows developers to test a request without actually sending a message.

The default value is false.

Definition at line 69 of file NotificationOptions.cs.

◆ MessageId

string Waher.Networking.HTTP.Firebase.NotificationOptions.MessageId
getset

This parameter uniquely identifies a message in an XMPP connection.

Definition at line 34 of file NotificationOptions.cs.

◆ MutableContent

bool Waher.Networking.HTTP.Firebase.NotificationOptions.MutableContent
getset

On Apple platforms, use this field to represent mutable-content in the APNs payload. When a notification is sent and this is set to true, the content of the notification can be modified before it is displayed, using a Notification Service app extension. This parameter will be ignored for Android and web.

Definition at line 62 of file NotificationOptions.cs.

◆ Priority

NotificationPriority Waher.Networking.HTTP.Firebase.NotificationOptions.Priority
getset

Sets the priority of the message. Valid values are "normal" and "high." On Apple platforms, these correspond to APNs priorities 5 and 10.

By default, notification messages are sent with high priority, and data messages are sent with normal priority.Normal priority optimizes the client app's battery consumption and should be used unless immediate delivery is required. For messages with normal priority, the app may receive the message with unspecified delay.

When a message is sent with high priority, it is sent immediately, and the app can display a notification.

Definition at line 52 of file NotificationOptions.cs.

◆ TimeToLive

int Waher.Networking.HTTP.Firebase.NotificationOptions.TimeToLive
getset

This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message.

Definition at line 74 of file NotificationOptions.cs.


The documentation for this class was generated from the following file: