NotificationAPI interface

An interface representing notification related APIs

Methods

hide(HideNotificationConfig)

Dismisses a notification toast

open(OpenNotificationConfig)

Shows a notification toast

Method Details

hide(HideNotificationConfig)

Dismisses a notification toast

function hide(config: HideNotificationConfig)

Parameters

config
HideNotificationConfig

The configuration of dismissing a notification, including the id of the notification to dismiss

open(OpenNotificationConfig)

Shows a notification toast

function open(config: OpenNotificationConfig): Promise<OpenNotificationResult>

Parameters

config
OpenNotificationConfig

The configuration of showing a notification, including notification type, title, message, dismiss delay, buttons etc.

Returns

A promise which resolves when the notification toast is scheduled to open