as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
The useToastKepler hook provides functionality that allows you to display an on-screen notification. The hook provides the show method which takes the following parameters:
  • title: A string with the primary text to display.
  • description: A string with the secondary text to display.
  • duration: (optional) The duration of the toast - either ToastKeplerDuration.SHORT or ToastKeplerDuration.LONG. Default value is set to ToastKeplerDuration.SHORT.
  • iconUri: A URI in the format of a HTTP(S) URL or a local file URI. For local files, use the format file:///path/to/file.
  • iconSize (optional) A string with a size of the icon. The parameter can take small, normal or large values. Default to normal
  • options (optional) An object that enables to extend the Toast with launching app section
    • launchUri A string with uri of the app to launch.
    • launchTitle A string with the text showed next to the launch icon

Vega support

To use the hook, request the com.amazon.notification.privilege.post privilege in the app manifest.toml file.

Usage

The following example shows how to create and display a toast.

Reference

Methods

show

Shows a notification message (toast) on the device screen

Properties

SHORT

Specifies how long the toast notification appears on the screen.

LONG

Specifies how long the toast notification appears on the screen.

最后修改于 2026年10月26日