alert
Triggers an alert on the device, which may take the form of vibration, sound or a combination of both.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"playSound" | Boolean | Indicates whether the device plays sound when the action is triggered. | false |
"soundType" | String | The sound type that is played. | null |
"vibrate" | Boolean | Indicates whether the device vibrates when the action is triggered. | false |
"vibrationType" | VibrationType | The vibration type. | 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: Create an alert
Goal: Create an alert with heavy vibration and sound.
To achieve this the following code can be used:
{
"type": "alert",
"params": {
"vibrate": true,
"vibrationType": "heavy",
"playSound": true,
"soundType": "default"
}
}
The sound does not play when the device is muted
Result:
An alert action has been created