Skip to content

ToastMessage

Toast messages appear as pop-ups that are automatically dismissed after a defined duration. In Mobile Development Kit, you can create toast messages and define their behavior.

Note: Failure event handlers cannot be defined for toast messages. On the other hand, you must use success event handlers while binding other actions to a toast message. Once the toast message appears, subsequent actions are executed immediately.

The properties defined in Action are also applicable to this action.

ToastMessage Properties

Property Type Required Default
Animated boolean Optional
Duration integer Optional 2
Icon Image Optional
IsIconHidden boolean Optional false
Message string Required
NumberOfLines integer Optional 1
_Type const Required

Animated

If true, the message has an animated effect. For iOS devices, the default value is False. For Android devices, this property is ignored. The toast for Android always has an animated effect.

  • type: boolean

Duration

Number of seconds that the message is shown.

  • type: integer
  • default: 2

Icon

File path to the location of the image that appears as an icon in the message. Default image is a check-mark. For Android devices, this property is ignored.


IsIconHidden

If True, the icon is hidden. For Android devices, this property is ignored.

  • type: boolean
  • default: false

Message

Text that conveys the message.

  • type: string

NumberOfLines

Number of lines of the message text that is shown.

  • type: integer
  • default: 1

_Type

  • type: const

The value of this property must be equal to:

"Action.Type.ToastMessage"

Action Result

This action has no ActionResult.


Examples

// ToastMessage.action
{
    "Message": "This is a toast message test",
    "Icon": "test.png",
    "IsIconHidden": false,
    "NumberOfLines": 2,
    "Duration": 3,
    "Animated": true,
    "_Type": "Action.Type.ToastMessage"
}