Skip to main content

Describes a notification.

Properties (26)

Property Type Default Required Description
actions⚓︎ NotificationAction[] x x

Array of objects describing notification actions. The notification actions will be displayed as buttons in the notification.

appIcon⚓︎ string x x

Icon of the app that has raised the notification.

appTitle⚓︎ string x x

Title of the app that has raised the notification.

badge⚓︎ string x x

URL of an image to represent the notification as a badge.

body⚓︎ string x x

Notification body text.

clickInterop⚓︎ InteropActionSettings x x

Settings for invoking an Interop method when the notification is clicked.

data⚓︎ any x x

Arbitrary data you have associated with the notification.

dir⚓︎ "auto" | "ltr" | "rtl" "auto" x

The direction in which to display the notification.

icon⚓︎ string x x

URL of an icon to be displayed in the notification.

id⚓︎ string x

ID for the notification.

image⚓︎ string x x

URL of an image to be displayed in the notification.

instanceId⚓︎ string x

ID of the app instance that has raised the notification.

lang⚓︎ string x x

Language code of the notification.

panelExpiry⚓︎ number x x

Interval in seconds after which the notification will be removed from the Notification Panel.

renotify⚓︎ boolean false x

If true, will renotify the user if a new notification replaces an old one. In this case, tag must also be set.

requireInteraction⚓︎ boolean false x

If true, the notification will remain active and won't be closed until the user clicks on it or dismisses it.

severity⚓︎ "Low" | "Medium" | "High" | "Critical" | "None" x x

Severity of the notification.

silent⚓︎ boolean false x

If true, the notification will be silent (no sound or vibration) despite the device settings. In this case, vibrate must not be set.

source⚓︎ string x x

Can be used for overwriting the name of the actual notification source.

state⚓︎ State x x

State of the raised notification.

tag⚓︎ string x x

ID tag of the notification.

timestamp⚓︎ number x x

Specifies the time at which the notification is created or is applicable (past, present or future).

title⚓︎ string x

Title for the notification.

toastExpiry⚓︎ number x x

Interval in seconds after which the notification toast will be hidden.

type⚓︎ "Notification" | "Alert" x x

Type of the notification. "Notification" is usually a general non-urgent notification, while "Alert" is an urgent one.

vibrate⚓︎ number[] x x

Vibration pattern for the vibration hardware of the device to emit with the notification. If specified, silent must not be true.