beginNFCReading
Starts listening to NFC tags. Shows a toast if NFC is not available or not activated.
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 |
"onTagActions" (required) | Array | List of actions that are executed after an NFC tag is detected. | 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 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.