Skip to main content

showMessage

Displays a message.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"action"ObjectAction to perform on tap.null
"asNotification"Boolean,StringDetermines if this message should be shown as a push notification.false
"asToast"Boolean,StringDetermines if the message should be shown as toast instead of snack bar (Android only).false
"async"BooleanSpecifies whether the action should perform asynchronously.null
"channel"StringNotification channel for the notification (for asNotification messages only).null
"displayDuration"NumberDisplay duration of the message in seconds. On Android it is only checked if the duration is smaller or at least 3.3
"icon"StringPredefines icon, which is optionally displayed prior to the text (Android only).null
"image"StringImage to display in the notification (for asNotification messages only).null
"notificationSound"StringNamed notification sound (for asNotification messages only).null
"requiredTables"Arrayundefinednull
"text"StringThe text of the message.null
"title"StringThe title of the message.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType 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:

Screencapture of the app showing the results of the sample code from Example 1.
A showMessage action has been created.