FirebaseAdmin.Messaging.AndroidNotification

Represents the Android-specific notification options that can be included in a Message.

Summary

Properties

Body
string
Gets or sets the title of the Android notification.
BodyLocArgs
IEnumerable< string >
Gets or sets the collection of resource key strings that will be used in place of the format specifiers in BodyLocKey.
BodyLocKey
string
Gets or sets the key of the body string in the app's string resources to use to localize the body text.
ChannelId
string
Gets or sets the Android notification channel ID (new in Android O).
ClickAction
string
Gets or sets the action associated with a user click on the notification.
Color
string
Gets or sets the notification icon color.
DefaultLightSettings
bool
Gets or sets a value indicating whether or not to use the default light settings.
DefaultSound
bool
Gets or sets a value indicating whether or not to use the default sound.
DefaultVibrateTimings
bool
Gets or sets a value indicating whether or not to use the default vibration timings.
EventTimestamp
DateTime
Gets or sets the time that the event in the notification occurred for notifications that inform users about events with an absolute time reference.
Icon
string
Gets or sets the icon of the Android notification.
ImageUrl
string
Gets or sets the URL of the image to be displayed in the notification.
LightSettings
Gets or sets the settings to control the notification's LED blinking rate and color if LED is available on the device.
LocalOnly
bool
Gets or sets a value indicating whether or not this notification is relevant only to the current device.
NotificationCount
int
Gets or sets the number of items this notification represents.
Priority
Gets or sets the relative priority for this notification.
Sound
string
Gets or sets the sound to be played when the device receives the notification.
Sticky
bool
Gets or sets a value indicating whether the notification is automatically dismissed or persists when the user clicks it in the panel.
Tag
string
Gets or sets the notification tag.
Ticker
string
Gets or sets the "ticker" text which is sent to accessibility services.
Title
string
Gets or sets the title of the Android notification.
TitleLocArgs
IEnumerable< string >
Gets or sets the collection of resource key strings that will be used in place of the format specifiers in TitleLocKey.
TitleLocKey
string
Gets or sets the key of the title string in the app's string resources to use to localize the title text.
VibrateTimingsMillis
long[]
Gets or sets a list of vibration timings in milliseconds in the array to use.
Visibility
Gets or sets the visibility of this notification.

Properties

Body

string Body

Gets or sets the title of the Android notification.

When provided, overrides the title set via Notification.Body.

BodyLocArgs

IEnumerable< string > BodyLocArgs

Gets or sets the collection of resource key strings that will be used in place of the format specifiers in BodyLocKey.

BodyLocKey

string BodyLocKey

Gets or sets the key of the body string in the app's string resources to use to localize the body text.

ChannelId

string ChannelId

Gets or sets the Android notification 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.

ClickAction

string ClickAction

Gets or sets 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.

Color

string Color

Gets or sets the notification icon color.

Must be of the form #RRGGBB.

DefaultLightSettings

bool DefaultLightSettings

Gets or sets a value indicating whether or not to use the default light settings.

If set to true, use the Android framework's default LED light settings for the notification. Default values are specified in config.xml. If DefaultLightSettings is set to true and LightSettings is also set, the user-specified LightSettings is used instead of the default value.

DefaultSound

bool DefaultSound

Gets or sets a value indicating whether or not to use the default sound.

If set to true, use the Android framework's default sound for the notification. Default values are specified in config.xml.

DefaultVibrateTimings

bool DefaultVibrateTimings

Gets or sets a value indicating whether or not to use the default vibration timings.

If set to true, use the Android Sets the whether to use the default vibration timings. If set to true, use the Android in config.xml. If DefaultVibrateTimings is set to true and VibrateTimingsMillis is also set, the default value is used instead of the user-specified VibrateTimingsMillis.

EventTimestamp

DateTime EventTimestamp

Gets or sets the time that the event in the notification occurred for notifications that inform users about events with an absolute time reference.

Notifications in the panel are sorted by this time.

Icon

string Icon

Gets or sets the icon of the Android notification.

ImageUrl

string ImageUrl

Gets or sets the URL of the image to be displayed in the notification.

LightSettings

LightSettings LightSettings

Gets or sets the 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.

LocalOnly

bool LocalOnly

Gets or sets a value indicating 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.

NotificationCount

int NotificationCount

Gets or sets the number of items this notification represents.

May be displayed as a badge count for launchers that support badging. If not invoked then notification count is left unchanged. 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.

Priority

NotificationPriority Priority

Gets or sets 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.

Sound

string Sound

Gets or sets the sound to be played when the device receives the notification.

Sticky

bool Sticky

Gets or sets a value indicating whether the notification is automatically dismissed or persists when the user clicks it in the panel.

When set to false, the notification is automatically dismissed. When set to true, the notification persists.

Tag

string Tag

Gets or sets the notification tag.

This is an identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification.

Ticker

string Ticker

Gets or sets the "ticker" text which is sent to accessibility services.

Prior to API level 21 (Lollipop), gets or sets the text that is displayed in the status bar when the notification first arrives.

Title

string Title

Gets or sets the title of the Android notification.

When provided, overrides the title set via Notification.Title.

TitleLocArgs

IEnumerable< string > TitleLocArgs

Gets or sets the collection of resource key strings that will be used in place of the format specifiers in TitleLocKey.

TitleLocKey

string TitleLocKey

Gets or sets the key of the title string in the app's string resources to use to localize the title text.

VibrateTimingsMillis

long[] VibrateTimingsMillis

Gets or sets a list of vibration timings in milliseconds in the array to use.

The first value in the array 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 VibrateTimingsMillis is set and DefaultVibrateTimings is set to true, the default value is used instead of the user-specified VibrateTimingsMillis. A duration in seconds with up to nine fractional digits, terminated by 's'.Example: "3.5s".

Visibility

NotificationVisibility Visibility

Gets or sets the visibility of this notification.