Skip to main content
Version: 4.55

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

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"event"StringThe event that will be fired.null
"timeout"Number,StringThe time of inactivity (in seconds) after which the event is fired.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: 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.