(Missing additions to 5.40)
Line 52: Line 52:
  
 
[[Constraint: Clipboard content|Clipboard content]]
 
[[Constraint: Clipboard content|Clipboard content]]
 +
 +
[[Constraint: Compare Values|Compare Values]]
  
 
[[Constraint: Dark Mode|Dark Mode]]
 
[[Constraint: Dark Mode|Dark Mode]]
Line 65: Line 67:
 
[[Constraint: Device Orientation|Device Orientation]]
 
[[Constraint: Device Orientation|Device Orientation]]
  
[[Constraint: Floating button|Floating button]]
+
[[Constraint: Floating Button|Floating Button]]
  
 
[[Constraint: Floating Text|Floating Text]]
 
[[Constraint: Floating Text|Floating Text]]
Line 82: Line 84:
  
 
[[Constraint: Location Mode|Location Mode]]
 
[[Constraint: Location Mode|Location Mode]]
 +
 +
[[Constraint: Macro Running|Macro Running]]
  
 
[[Constraint: Macro(s) Enabled/Disabled|Macro(s) Enabled/Disabled]]
 
[[Constraint: Macro(s) Enabled/Disabled|Macro(s) Enabled/Disabled]]
Line 115: Line 119:
 
[[Constraint: Proximity Sensor|Proximity Sensor]]
 
[[Constraint: Proximity Sensor|Proximity Sensor]]
  
[[Constraint: Quick tile state|Quick tile state]]
+
[[Constraint: Quick Tile State|Quick Tile State]]
  
 
[[Constraint: Ringer Volume|Ringer Volume]]
 
[[Constraint: Ringer Volume|Ringer Volume]]
Line 130: Line 134:
  
 
[[Constraint: Sunrise/Sunset|Sunrise/Sunset]]
 
[[Constraint: Sunrise/Sunset|Sunrise/Sunset]]
 +
 +
[[Constraint: System Settings|System Settings]]
  
 
[[Constraint: Time of Day|Time of Day]]
 
[[Constraint: Time of Day|Time of Day]]

Revision as of 06:08, 13 February 2024

Constraints are optional and can be used to allow or prevent a macro/action from running based on certain conditions.

Constraints can be placed on macros to allow or prevent the entire macro firing based on the set condition(s). You can also add constraints directly to individual triggers and actions from the 'Edit Macro' screen, by clicking on the trigger/action and selecting "Add constraint"

A constraint is evaluated at the point a trigger fires or action runs and a macro/action will only run if the constraint condition is true.

By default if adding more than one constraint to a macro they will be combined with an AND condition (e.g. all added constraints must be true). This can be changed in the dropdown in the constraints title to an OR condition. In this case only one of the added constraints needs to be true for the macro to run.

Nesting constraints

If you need more sophisticated logic applied to constraint there is a special AND/OR/XOR/NOT constraint that can be used. Any constraints nested under the logic constraint will have that logic operator applied. It's also possible to nest multiple logic constraints to create complex logic. For example:

AND
 | - Constraint 1
 | - OR
     | - Constraint 2
     | - Constraint 3

In the above example, Constraint 1 must always be true AND at least one of (Constraint 2 OR Constraint 3) must be true.

List of Constraints

ADB Hacked

Airplane Mode

AND / OR / XOR / NOT

Application Running

Auto Rotate

Auto Sync

Battery Level

Battery Saver State

Battery Temperature

Bluetooth State

Brightness

Calendar Entry

Call State

Category Enabled/Disabled

Cell Towers

Clipboard content

Compare Values

Dark Mode

Day of the Month

Day of the Week

Device Facing

Device Locked/Unlocked

Device Orientation

Floating Button

Floating Text

Geofence (Location)

GPS State

Headphone Connection

IP address

Is Roaming

Light Sensor

Location Mode

Macro Running

Macro(s) Enabled/Disabled

Macro(s) Invoked/Not invoked Recently

MacroDroid Invocation Method

MacroDroid Mode

MacroDroid Variable

Mobile Data On/Off

Mobile Service Status

Month of the Year

Music Active

NFC State

Notification Present

Notification Volume

Phone Ringing

Power Connected

Priority Mode / Do Not Disturb

Proximity Sensor

Quick Tile State

Ringer Volume

Roaming Enabled

Rooted Device

Screen On/Off

Speakerphone On/Off

Stopwatch

Sunrise/Sunset

System Settings

Time of Day

Time Since Boot

Torch On/Off

Trigger Fired

Volume Level

VPN State

Wifi HotSpot State

Wifi State