BuildNotificationOptions
BuildNotificationOptions
notification.BuildNotificationOptions
Options for building a notification: title, body text, icon, tap behavior, action buttons, and related flags.
See also
Table of contents
Properties
Properties
actions
• Optional actions: NotificationAction[]
Optional list of extra action buttons on the notification.
autoCancel
• Optional autoCancel: boolean
When true, tapping the notification in the shade dismisses it. Default is false.
contentText
• Optional contentText: string
Secondary body text of the notification.
contentTitle
• Optional contentTitle: string
Title line of the notification.
onContentClick
• Optional onContentClick: VoidFunction
Callback when the user taps the notification content (not necessarily an action button).
onDelete
• Optional onDelete: VoidFunction
Callback when the notification is removed (e.g. swiped away by the user).
ongoing
• Optional ongoing: boolean
Marks an ongoing notification—commonly used for background work such as music playback or file download.
silent
• Optional silent: boolean
When true, posts as a silent status-bar update. Default is false.
ticker
• Optional ticker: string
Ticker text shown in the status bar briefly when the notification first appears (legacy behavior on older Android versions).
