Difference between revisions of "Constraint: NFC State"
| Line 1: | Line 1: | ||
| − | < | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on whether NFC is enabled.</pre> |
| − | + | ''' 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]] | ||
Latest revision as of 13:31, 9 January 2026
This constraint allows or prevents a macro/feature from running based on whether NFC is enabled.
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
Triggers Widget Button
Actions IF (NFC State - Enabled) Launch Application: Wallet ELSE Popup Message "NFC is disabled" ENDIF
See Also