AndroidNotification extension type

Represents the Android-specific notification options that can be included in {@link AndroidConfig}.

on
Implemented types
Available extensions

Constructors

AndroidNotification({String? title, String? body, String? icon, String? color, String? sound, String? tag, String? imageUrl, String? clickAction, String? bodyLocKey, JSArray<JSString>? bodyLocArgs, String? titleLocKey, JSArray<JSString>? titleLocArgs, String? channelId, String? ticker, bool? sticky, Date? eventTimestamp, bool? localOnly, String? priority, JSArray<JSNumber>? vibrateTimingsMillis, bool? defaultVibrateTimings, bool? defaultSound, LightSettings? lightSettings, bool? defaultLightSettings, String? visibility, int? notificationCount})
Constructor

Properties

body → String?
Body of the Android notification. When provided, overrides the body set via admin.messaging.Notification.
no setter
bodyLocArgs → JSArray<JSString>?
An array of resource keys that will be used in place of the format specifiers in bodyLocKey.
no setter
bodyLocKey → String?
Key of the body string in the app's string resource to use to localize the body text.
no setter
channelId → String?
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 can be 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.
no setter
clickAction → String?
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.
no setter
color → String?
Notification icon color in #rrggbb format.
no setter
defaultLightSettings → bool?
If set to true, use the Android framework's default LED light settings for the notification. Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml | 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.
no setter
defaultSound → bool?
If set to true, use the Android framework's default sound for the notification. Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml | config.xml}.
no setter
defaultVibrateTimings → bool?
If set to true, use the Android framework's default vibrate pattern for the notification. Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml | 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.
no setter
eventTimestamp → Date?
For notifications that inform users about events with an absolute time reference, sets the time that the event in the notification occurred. Notifications in the panel are sorted by this time.
no setter
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
Icon resource for the Android notification.
no setter
imageUrl → String?
URL of an image to be displayed in the notification.
no setter
isDefinedAndNotNull → bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
isNull → bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript null.
no setter
isTruthy → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !!this in JavaScript.
no setter
isUndefined → bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript undefined.
no setter
isUndefinedOrNull → bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
lightSettings → 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.
no setter
localOnly → bool?
Sets 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 {@link https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging | Wear OS guides}.
no setter
not → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
notificationCount → int?
Sets the number of items this notification represents. May be displayed as a badge count for Launchers that support badging. See {@link https://developer.android.com/training/notify-user/badges | NotificationBadge}. 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.
no setter
priority → String?
Sets the relative priority for this notification. Low-priority notifications may be hidden from the user in certain situations. 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.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sound → String?
File name of the sound to be played when the device receives the notification.
no setter
sticky → bool?
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.
no setter
tag → String?
Notification tag. This is an identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification.
no setter
ticker → String?
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.
no setter
title → String?
Title of the Android notification. When provided, overrides the title set via admin.messaging.Notification.
no setter
titleLocArgs → JSArray<JSString>?
An array of resource keys that will be used in place of the format specifiers in titleLocKey.
no setter
titleLocKey → String?
Key of the title string in the app's string resource to use to localize the title text.
no setter
vibrateTimingsMillis → JSArray<JSNumber>?
Sets the vibration pattern to use. Pass in an array of milliseconds to turn the vibrator on or off. 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.
no setter
visibility → String?
Sets the visibility of the notification. Must be either private, public, or secret. If unspecified, defaults to private.
no setter

Methods

add(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this + any in JavaScript.
and(JSAny? any) → JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this && any in JavaScript.
callMethod<R extends JSAny?>(JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with up to four arguments.
callMethodVarArgs<R extends JSAny?>(JSAny method, [List<JSAny?>? arguments]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with a variable number of arguments.
dartify() → Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript JSON-like value to the Dart equivalent if possible.
delete(JSAny property) → JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Deletes the property with key property from this JSObject.
divide(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this / any in JavaScript.
equals(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this == any in JavaScript.
exponentiate(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this ** any in JavaScript.
getProperty<R extends JSAny?>(JSAny property) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

The value of the property key property of this JSObject.
greaterThan(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >= any in JavaScript.
has(String property) → bool

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for hasProperty to check whether this JSObject contains the property key property, but takes and returns a Dart value.
hasProperty(JSAny property) → JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Whether or not this JSObject contains the property key property.
instanceof(JSFunction<Function> constructor) → bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) → bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof the constructor that is defined by constructorName, which is looked up in the globalContext.
lessThan(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this <= any in JavaScript.
modulo(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this % any in JavaScript.
multiply(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this * any in JavaScript.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this != any in JavaScript.
or(JSAny? any) → JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this || any in JavaScript.
setProperty(JSAny property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Write the value of property key property of this JSObject.
strictEquals(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this === any in JavaScript.
strictNotEquals(JSAny? any) → JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this !== any in JavaScript.
subtract(JSAny? any) → JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this - any in JavaScript.
toJson() → Map<String, dynamic>

Available on JSAny, provided by the FirebaseJsInteropJSAnyExtension extension

Convert a JSAny to a Map<String, dynamic>
toString() → String
A string representation of this object.
inherited
typeofEquals(String typeString) → bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this JSAny? is typeString.
unsignedRightShift(JSAny? any) → JSNumber

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >>> any in JavaScript.

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String property) → JSAny?

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for getProperty to get the value of the property key property of this JSObject, but takes a Dart value.
operator []=(String property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for setProperty to write the value of the property key property of this JSObject, but takes a Dart value.