Class AndroidNotification
Notification to send to android devices.
Implements
Inherited Members
Namespace: Google.Apis.FirebaseCloudMessaging.v1.Data
Assembly: Google.Apis.FirebaseCloudMessaging.v1.dll
Syntax
public class AndroidNotification : IDirectResponseSchema
Properties
Body
The notification's body text. If present, it will override google.firebase.fcm.v1.Notification.body.
Declaration
[JsonProperty("body")]
public virtual string Body { get; set; }
Property Value
Type | Description |
---|---|
string |
BodyLocArgs
Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization. See Formatting and Styling for more information.
Declaration
[JsonProperty("bodyLocArgs")]
public virtual IList<string> BodyLocArgs { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
BodyLocKey
The key to the body string in the app's string resources to use to localize the body text to the user's current localization. See String Resources for more information.
Declaration
[JsonProperty("bodyLocKey")]
public virtual string BodyLocKey { get; set; }
Property Value
Type | Description |
---|---|
string |
BypassProxyNotification
If set, display notifications delivered to the device will be handled by the app instead of the proxy.
Declaration
[JsonProperty("bypassProxyNotification")]
public virtual bool? BypassProxyNotification { get; set; }
Property Value
Type | Description |
---|---|
bool? |
ChannelId
The notification's channel id (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
Declaration
[JsonProperty("channelId")]
public virtual string ChannelId { get; set; }
Property Value
Type | Description |
---|---|
string |
ClickAction
The action associated with a user click on the notification. If specified, an activity with a matching intent filter is launched when a user clicks on the notification.
Declaration
[JsonProperty("clickAction")]
public virtual string ClickAction { get; set; }
Property Value
Type | Description |
---|---|
string |
Color
The notification's icon color, expressed in #rrggbb format.
Declaration
[JsonProperty("color")]
public virtual string Color { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultLightSettings
If set to true, use the Android framework's default LED light settings for the notification. Default values
are specified in
config.xml.
If default_light_settings
is set to true and light_settings
is also set, the user-specified
light_settings
is used instead of the default value.
Declaration
[JsonProperty("defaultLightSettings")]
public virtual bool? DefaultLightSettings { get; set; }
Property Value
Type | Description |
---|---|
bool? |
DefaultSound
If set to true, use the Android framework's default sound for the notification. Default values are specified in config.xml.
Declaration
[JsonProperty("defaultSound")]
public virtual bool? DefaultSound { get; set; }
Property Value
Type | Description |
---|---|
bool? |
DefaultVibrateTimings
If set to true, use the Android framework's default vibrate pattern for the notification. Default values are
specified in
config.xml.
If default_vibrate_timings
is set to true and vibrate_timings
is also set, the default value is used
instead of the user-specified vibrate_timings
.
Declaration
[JsonProperty("defaultVibrateTimings")]
public virtual bool? DefaultVibrateTimings { get; set; }
Property Value
Type | Description |
---|---|
bool? |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
EventTime
object representation of EventTimeRaw.
Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use EventTimeDateTimeOffset instead.")]
public virtual object EventTime { get; set; }
Property Value
Type | Description |
---|---|
object |
EventTimeDateTimeOffset
DateTimeOffset representation of EventTimeRaw.
Declaration
[JsonIgnore]
public virtual DateTimeOffset? EventTimeDateTimeOffset { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset? |
EventTimeRaw
Set the time that the event in the notification occurred. Notifications in the panel are sorted by this time. A point in time is represented using protobuf.Timestamp.
Declaration
[JsonProperty("eventTime")]
public virtual string EventTimeRaw { get; set; }
Property Value
Type | Description |
---|---|
string |
Icon
The notification's icon. Sets the notification icon to myicon for drawable resource myicon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.
Declaration
[JsonProperty("icon")]
public virtual string Icon { get; set; }
Property Value
Type | Description |
---|---|
string |
Image
Contains the URL of an image that is going to be displayed in a notification. If present, it will override google.firebase.fcm.v1.Notification.image.
Declaration
[JsonProperty("image")]
public virtual string Image { get; set; }
Property Value
Type | Description |
---|---|
string |
LightSettings
Settings to control the notification's LED blinking rate and color if LED is available on the device. The total blinking time is controlled by the OS.
Declaration
[JsonProperty("lightSettings")]
public virtual LightSettings LightSettings { get; set; }
Property Value
Type | Description |
---|---|
LightSettings |
LocalOnly
Set whether or not this notification is relevant only to the current device. Some notifications can be bridged to other devices for remote display, such as a Wear OS watch. This hint can be set to recommend this notification not be bridged. See Wear OS guides
Declaration
[JsonProperty("localOnly")]
public virtual bool? LocalOnly { get; set; }
Property Value
Type | Description |
---|---|
bool? |
NotificationCount
Sets the number of items this notification represents. May be displayed as a badge count for launchers that support badging.See Notification Badge. For example, this might be useful if you're using just one notification to represent multiple new messages but you want the count here to represent the number of total new messages. If zero or unspecified, systems that support badging use the default, which is to increment a number displayed on the long-press menu each time a new notification arrives.
Declaration
[JsonProperty("notificationCount")]
public virtual int? NotificationCount { get; set; }
Property Value
Type | Description |
---|---|
int? |
NotificationPriority
Set the relative priority for this notification. Priority is an indication of how much of the user's
attention should be consumed by this notification. Low-priority notifications may be hidden from the user in
certain situations, while the user might be interrupted for a higher-priority notification. The effect of
setting the same priorities may differ slightly on different platforms. Note this priority differs from
AndroidMessagePriority
. This priority is processed by the client after the message has been delivered,
whereas
AndroidMessagePriority
is an FCM concept that controls when the message is delivered.
Declaration
[JsonProperty("notificationPriority")]
public virtual string NotificationPriority { get; set; }
Property Value
Type | Description |
---|---|
string |
Proxy
Setting to control when a notification may be proxied.
Declaration
[JsonProperty("proxy")]
public virtual string Proxy { get; set; }
Property Value
Type | Description |
---|---|
string |
Sound
The sound to play when the device receives the notification. Supports "default" or the filename of a sound resource bundled in the app. Sound files must reside in /res/raw/.
Declaration
[JsonProperty("sound")]
public virtual string Sound { get; set; }
Property Value
Type | Description |
---|---|
string |
Sticky
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it.
Declaration
[JsonProperty("sticky")]
public virtual bool? Sticky { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Tag
Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.
Declaration
[JsonProperty("tag")]
public virtual string Tag { get; set; }
Property Value
Type | Description |
---|---|
string |
Ticker
Sets the "ticker" text, which is sent to accessibility services. Prior to API level 21 (Lollipop
), sets
the text that is displayed in the status bar when the notification first arrives.
Declaration
[JsonProperty("ticker")]
public virtual string Ticker { get; set; }
Property Value
Type | Description |
---|---|
string |
Title
The notification's title. If present, it will override google.firebase.fcm.v1.Notification.title.
Declaration
[JsonProperty("title")]
public virtual string Title { get; set; }
Property Value
Type | Description |
---|---|
string |
TitleLocArgs
Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization. See Formatting and Styling for more information.
Declaration
[JsonProperty("titleLocArgs")]
public virtual IList<string> TitleLocArgs { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
TitleLocKey
The key to the title string in the app's string resources to use to localize the title text to the user's current localization. See String Resources for more information.
Declaration
[JsonProperty("titleLocKey")]
public virtual string TitleLocKey { get; set; }
Property Value
Type | Description |
---|---|
string |
VibrateTimings
Set the vibration pattern to use. Pass in an array of
protobuf.Duration
to turn on or off the vibrator. The first value indicates the Duration
to wait before turning the vibrator
on. The next value indicates the Duration
to keep the vibrator on. Subsequent values alternate between
Duration
to turn the vibrator off and to turn the vibrator on. If vibrate_timings
is set and
default_vibrate_timings
is set to true
, the default value is used instead of the user-specified
vibrate_timings
.
Declaration
[JsonProperty("vibrateTimings")]
public virtual IList<object> VibrateTimings { get; set; }
Property Value
Type | Description |
---|---|
IList<object> |
Visibility
Set the Notification.visibility of the notification.
Declaration
[JsonProperty("visibility")]
public virtual string Visibility { get; set; }
Property Value
Type | Description |
---|---|
string |