showMessage
Displays a message.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"action" | Object | Action to perform on tap. | null |
"asNotification" | Boolean,String | Determines if this message should be shown as a push notification. | false |
"asToast" | Boolean,String | Determines if the message should be shown as toast instead of snack bar (Android only). | false |
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"channel" | String | Notification channel for the notification (for asNotification messages only). | null |
"displayDuration" | Number | Display duration of the message in seconds. On Android it is only checked if the duration is smaller or at least 3. | 3 |
"icon" | String | Predefines icon, which is optionally displayed prior to the text (Android only). | null |
"image" | String | Image to display in the notification (for asNotification messages only). | null |
"notificationSound" | String | Named notification sound (for asNotification messages only). | null |
"requiredTables" | Array | undefined | null |
"text" | String | The text of the message. | null |
"title" | String | The title of the message. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type name of the action. | null |
Examples
Example 1: Display a message
Goal: Create a showMessage
action that will display a message with a title and a text.
title
and text
keys have to be assigned within the params
object of the action.
{
"type": "showMessage",
"params": {
"title": "Title of the message",
"text": "Text of the message"
}
}
Result:
A showMessage
action has been created.