showToastNotification( )


Displays a toast notification for a mobile app.

developer preview tag

Use toast notifications to provide app users with brief messages without interrupting the workflow. You can also choose to add an action button that the user can press. For example, "Undo".

Toast notifications are often used to confirm actions or inform app users of new information.

Method Declaration
Copy
Method Parameters
bodystringRequired

Message to be displayed in the toast notification.


typestring

Type of toast. The supported values are found in the ToastTypes property in appFramework. Supported values:

  • appFramework.ToastTypes.INFO
  • appFramework.ToastTypes.SUCCESS
  • appFramework.ToastTypes.FAILURE
  • appFramework.ToastTypes.OFFLINE

Default: appFramework.ToastTypes.INFO


actionLabelstring

Button text to display in the toast notification. Handle the button press when the promise resolves.

Returns
Return Type:Promise<ToastNotificationResult>
Display a toast notification
JavaScript
Did this help?