Difference between revisions of "Constraint: GPS State"

 
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]]

Latest revision as of 11:33, 9 January 2026

This constraint allows or prevents a macro/feature from running based on whether hardware GPS is enabled.

Options

  • Enabled: Constraint passes only when GPS is on
  • Disabled: Constraint passes only when GPS is off

Example

Example 1: Only open navigation when GPS is enabled

Triggers

Widget Button
Actions

Launch Application: Maps
Constraints

GPS State - Enabled

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