| 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 hardware GPS is enabled.</pre> |
| | | | |
| − | This constraint can be used to allow a trigger to fire only when GPS is enabled/disabled.
| + | ''' Options ''' |
| | | | |
| − | <span style="color: #0E9549; font-size: 24px;">'''Please note that'''</span>
| + | * '''Enabled''': Constraint passes only when GPS is on |
| | + | * '''Disabled''': Constraint passes only when GPS is off |
| | | | |
| − | On Android 5.0+ it is
| + | ''' Example ''' |
| − | recommended to use the Location Mode constraint instead. | + | |
| | + | ''Example 1: Only open navigation when GPS is enabled'' |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Widget Button</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Launch Application: Maps</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | GPS State - Enabled</pre> |
| | + | |
| | + | ''' Note ''' |
| | + | This is a legacy constraint that should not be used in most cases. It is strongly recommended to use the Location Mode constraint instead. |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger: GPS Enabled/Disabled|GPS Enabled/Disabled Trigger]] |