Difference between revisions of "Trigger: GPS Enabled/Disabled"
| Line 1: | Line 1: | ||
| − | <pre class="header-style"> | + | <pre class="header-style">The GPS Enabled/Disabled trigger fires when the GPS-based location service is turned on or off on the device. This allows you to automate actions based on changes to the device's GPS/location provider state.</pre> |
| − | + | ||
| − | </pre> | + | ''' Options ''' |
| + | |||
| + | * '''GPS Enabled''': Trigger fires when GPS/location services are turned ON | ||
| + | * '''GPS Disabled''': Trigger fires when GPS/location services are turned OFF | ||
| + | |||
| + | ''' Examples ''' | ||
| + | |||
| + | ''Example 1: Notification When GPS Disabled'' | ||
| + | <pre class="trigger-style">Triggers | ||
| + | |||
| + | GPS Disabled</pre> | ||
| + | <pre class="action-style">Actions | ||
| + | |||
| + | Popup Message - GPS has been disabled</pre> | ||
| + | |||
| + | Shows a popup notification when GPS is turned off. | ||
| + | |||
| + | ''Example 2: Start Location Logging When GPS Enabled'' | ||
| + | <pre class="trigger-style">Triggers | ||
| + | |||
| + | GPS Enabled</pre> | ||
| + | <pre class="action-style">Actions | ||
| + | |||
| + | Set Variable - gps_enabled = true | ||
| + | Enable Macro - Location Logger</pre> | ||
| + | |||
| + | Sets a variable and enables a location logging macro when GPS is turned on. | ||
| + | |||
| + | ''' Notes ''' | ||
| + | |||
| + | * This trigger monitors the PROVIDERS_CHANGED_ACTION broadcast from the Android LocationManager. | ||
| + | * It responds to changes in the GPS provider state, not the overall location services setting. | ||
| + | * The trigger fires on state changes, not the current state. Use a GPS constraint if you need to check the current GPS state. | ||
| + | |||
| + | ''' See Also ''' | ||
| + | |||
| + | * [[Constraint:_GPS_State|GPS State Constraint]] | ||
| + | * [[Trigger:_Location_Trigger|Location Trigger]] | ||
| + | * [[Trigger:_Geofence_Trigger|Geofence Trigger]] | ||
Latest revision as of 23:03, 5 January 2026
The GPS Enabled/Disabled trigger fires when the GPS-based location service is turned on or off on the device. This allows you to automate actions based on changes to the device's GPS/location provider state.
Options
- GPS Enabled: Trigger fires when GPS/location services are turned ON
- GPS Disabled: Trigger fires when GPS/location services are turned OFF
Examples
Example 1: Notification When GPS Disabled
Triggers GPS Disabled
Actions Popup Message - GPS has been disabled
Shows a popup notification when GPS is turned off.
Example 2: Start Location Logging When GPS Enabled
Triggers GPS Enabled
Actions Set Variable - gps_enabled = true Enable Macro - Location Logger
Sets a variable and enables a location logging macro when GPS is turned on.
Notes
- This trigger monitors the PROVIDERS_CHANGED_ACTION broadcast from the Android LocationManager.
- It responds to changes in the GPS provider state, not the overall location services setting.
- The trigger fires on state changes, not the current state. Use a GPS constraint if you need to check the current GPS state.
See Also