Skip to main content
Version: 4.62

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

Show ExampleHide Example

The specified event is fired if there is no activity for the duration specified in timeout.

{
"type": "checkForInactivity",
"params": {
"timeout": 300,
"event": "inactivityEvent"
}
}

The value of timeout is specified in seconds, so a value of 300 corresponds to 5 minutes.