| Line 1: |
Line 1: |
| − | <span style="color: #0E9549; font-size: 24px;">'''About this constraint '''</span> | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on whether NFC is enabled.</pre> |
| | | | |
| − | This constraint can be used to allow/prevent functionality from running based on the current state of the device's NFC enabled state.
| + | ''' Options ''' |
| | + | |
| | + | * '''Enabled''': Constraint passes only when NFC is on |
| | + | * '''Disabled''': Constraint passes only when NFC is off |
| | + | |
| | + | ''' Example ''' |
| | + | |
| | + | ''Example 1: Open your wallet app only when NFC is enabled. Warn the user if it's not enabled'' |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Widget Button</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | IF (NFC State - Enabled) |
| | + | Launch Application: Wallet |
| | + | ELSE |
| | + | Popup Message "NFC is disabled" |
| | + | ENDIF</pre> |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger: NFC Enabled State|NFC Enabled State Trigger]] |