checkForInactivity
Fires an event after a specified period of inactivity. The counter is reset to the specified time with each interaction. Inactivity is considered to be no touch or other interaction by the user. Automatic changes (e.g. a gallery auto-swipe) do not interrupt the inactivity counter.
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 |
"event" | String | The event that will be fired. | null |
"timeout" | Number,String | The time of inactivity (in seconds) after which the event is fired. | 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: Check for inactivity
Goal: Create a checkForInactivity action, that fires an event after 5 minutes.
To achieve this the following code can be used:
{
"type": "checkForInactivity",
"params": {
"timeout": 300,
"event": "inactivityEvent"
}
}
The value of timeout
is specified in seconds, so a value of 300 corresponds to 5 minutes.
Result:
A checkForInactivity action has been created.