| Line 1: |
Line 1: |
| − | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">Is used to invoke a macro when a particular NFC tag is scanned. An NFC tag should be first written by MacroDroid with a specific identifier and then this identifier can be used to trigger specific instances of the NFC trigger. | + | <pre class="header-style">The NFC Tag trigger fires when a specific NFC tag is scanned. Users must first write an identifier to an NFC tag using MacroDroid, then use that identifier to activate corresponding macros. This provides a simple way to trigger automation by tapping your device on an NFC tag.</pre> |
| | | | |
| − | Any writeable NDEF tag should be suitable for use with MacroDroid. Unfortunately it's not possible to use any other existing NFC tag (such as an access card/public transport card etc.). This is not permitted since there is no way to prevent other NFC apps also being fired, and this will require user input to select an app every time the tag is scanned.
| + | ''' Options ''' |
| − | </pre>
| + | |
| | + | * '''Write New Tag''' - Write a new identifier to an NFC tag. You will be prompted to enter a name for the tag, then scan the tag to write the MacroDroid identifier to it. |
| | + | * '''Use Existing Tag''' - Scan an existing MacroDroid-configured NFC tag to use its identifier for this trigger. |
| | + | |
| | + | ''' Tag Name ''' |
| | + | |
| | + | When writing a new tag, you must specify a name (up to 25 characters) that will identify the tag. This name is used to link the tag to the trigger configuration. |
| | + | |
| | + | ''' Examples ''' |
| | + | |
| | + | ''Example 1: Toggle bedroom lights when scanning NFC tag on nightstand'' |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | NFC Tag: Bedroom Lights</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | HTTP Request: Toggle Smart Light API |
| | + | Speak Text: Lights toggled</pre> |
| | + | |
| | + | ''Example 2: Clock in at work when scanning desk NFC tag'' |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | NFC Tag: Work Desk</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Variable: work_start = {hour}:{minute} |
| | + | Send SMS: Work arrival logged at {hour}:{minute}</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Day of Week: Monday, Tuesday, Wednesday, Thursday, Friday</pre> |
| | + | |
| | + | ''' Limitations ''' |
| | + | |
| | + | * Only writeable NDEF-compatible tags can be used with MacroDroid |
| | + | * The system cannot use existing NFC tags like access cards or transit passes because: |
| | + | ** These tags are typically read-only or protected |
| | + | ** There is no method to prevent other NFC applications from activating simultaneously when these tags are scanned |
| | + | ** Using pre-existing tags would require users to manually select an app with each scan |
| | + | * When writing to a tag, any existing data on the tag will be erased and replaced with the MacroDroid identifier |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * NFC must be enabled on your device for this trigger to work |
| | + | * The trigger uses a URL format (macrodroid://tag/[tagname]) written to the NFC tag |
| | + | * This trigger only appears on devices that have NFC hardware |
| | + | * The trigger fires when the device is tapped on the NFC tag, even when MacroDroid is not in the foreground |
| | + | * NFC tags are inexpensive and can be purchased online or at electronics stores |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger: NFC State Change]] |
| | + | * [[Action: Enable/Disable NFC]] |