Skip to main content

beginNFCReading

Starts listening to NFC tags. Shows a toast if NFC is not available or not activated.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"onTagActions" (required)ArrayList of actions that are executed after an NFC tag is detected.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: Create a beginNFCReading action

Goal: Create a beginNFCReading action that sends a message containing the ID of a detected NFC tag.

To achieve this the following code can be used:

{
"type": "beginNFCReading",
"params": {
"onTagActions": [
{
"type": "showMessage",
"params": {
"text": "ID was {{id}}"
}
}
]
}
}

When an NFC tag is detected, the showMessage action is fired, which displays the ID of the tag.

Result:

A beginNFCReading action has been created.