Difference between revisions of "Trigger: Location Trigger"

 
Line 1: Line 1:
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">The Location Trigger fires when you enter or exit a specified geographic area (zone). This trigger uses GPS functionality and may cause significant battery consumption. For better battery efficiency, consider using the Geofence Trigger which uses Google Play Services APIs.</pre>
It will be triggered when you enter or leave a specified area.
 
You should consider using the Geoference trigger.
 
The Geoference trigger functionality is equivalent and uses the Google Play services implementation, so it should be more reliable and battery efficient in most cases.
 
  
The location trigger will use GPS functionality (if enabled) and therefore may cause significant battery consumption. You can configure the location update frequency in the app settings to achieve an appropriate compromise between accuracy and battery consumption.
+
''' Options '''
</pre>
+
 
* '''''You are interested in''''' ''''' [https://macrodroidforum.com/wiki/index.php/Trigger:_Location_Trigger Geofence Trigger]'''''
+
* '''Zone''': Select which geographic zone will activate the trigger. Zones are configured in MacroDroid's Geofences settings.
 +
 
 +
* '''Area Entered/Exited''': Choose whether the trigger fires when:
 +
** Entering the specified area
 +
** Exiting the specified area
 +
 
 +
* '''Trigger if Previous Location Unknown''': When enabled, the trigger will fire even if MacroDroid cannot determine your previous location (such as after device reboot). By default, the trigger requires a confirmed state transition.
 +
 
 +
''' Settings '''
 +
 
 +
The location update rate can be configured in MacroDroid Settings to balance accuracy with battery consumption. More frequent updates provide better accuracy but drain more battery.
 +
 
 +
''' Examples '''
 +
 
 +
''Example 1: Turn Off WiFi When Leaving Home''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Location (Area Exited) - Home</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
WiFi Configure - Disable WiFi</pre>
 +
 
 +
Automatically turns off WiFi when leaving the home area.
 +
 
 +
''Example 2: Enable Ringer at Work''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Location (Area Entered) - Work</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Volume Change - Ringer: Vibrate Only</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
Day of Week: Mon, Tue, Wed, Thu, Fri</pre>
 +
 
 +
Sets the phone to vibrate when arriving at work on weekdays.
 +
 
 +
''' Notes '''
 +
 
 +
* Requires location permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION).
 +
* Location services must be enabled on the device.
 +
* This trigger uses GPS when available, which can cause significant battery drain.
 +
* The update rate can be adjusted in settings to compromise between accuracy and battery life.
 +
* A passive location listener is also registered to receive location updates from other apps, improving efficiency.
 +
* Geographic zones must be configured in MacroDroid's Geofences settings before use.
 +
* Consider using the [[Trigger:_Geofence_Trigger|Geofence Trigger]] instead, which uses Google Play Services and is typically more battery efficient.
 +
 
 +
''' Recommendation '''
 +
 
 +
The Geofence Trigger provides equivalent functionality but uses Google Play Services Geofence APIs, which are generally more reliable and battery efficient. Consider using the Geofence Trigger unless you have a specific need for GPS-based location tracking.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Geofence_Trigger|Geofence Trigger]] (recommended alternative)
 +
* [[Geofences|Geofences Configuration]]
 +
* [[Constraint:_Geofence|Geofence/Location Constraint]]

Latest revision as of 11:20, 6 January 2026

The Location Trigger fires when you enter or exit a specified geographic area (zone). This trigger uses GPS functionality and may cause significant battery consumption. For better battery efficiency, consider using the Geofence Trigger which uses Google Play Services APIs.

Options

  • Zone: Select which geographic zone will activate the trigger. Zones are configured in MacroDroid's Geofences settings.
  • Area Entered/Exited: Choose whether the trigger fires when:
    • Entering the specified area
    • Exiting the specified area
  • Trigger if Previous Location Unknown: When enabled, the trigger will fire even if MacroDroid cannot determine your previous location (such as after device reboot). By default, the trigger requires a confirmed state transition.

Settings

The location update rate can be configured in MacroDroid Settings to balance accuracy with battery consumption. More frequent updates provide better accuracy but drain more battery.

Examples

Example 1: Turn Off WiFi When Leaving Home

Triggers

Location (Area Exited) - Home
Actions

WiFi Configure - Disable WiFi

Automatically turns off WiFi when leaving the home area.

Example 2: Enable Ringer at Work

Triggers

Location (Area Entered) - Work
Actions

Volume Change - Ringer: Vibrate Only
Constraints

Day of Week: Mon, Tue, Wed, Thu, Fri

Sets the phone to vibrate when arriving at work on weekdays.

Notes

  • Requires location permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION).
  • Location services must be enabled on the device.
  • This trigger uses GPS when available, which can cause significant battery drain.
  • The update rate can be adjusted in settings to compromise between accuracy and battery life.
  • A passive location listener is also registered to receive location updates from other apps, improving efficiency.
  • Geographic zones must be configured in MacroDroid's Geofences settings before use.
  • Consider using the Geofence Trigger instead, which uses Google Play Services and is typically more battery efficient.

Recommendation

The Geofence Trigger provides equivalent functionality but uses Google Play Services Geofence APIs, which are generally more reliable and battery efficient. Consider using the Geofence Trigger unless you have a specific need for GPS-based location tracking.

See Also