| Line 1: |
Line 1: |
| − | <pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">This trigger will fire when the screen switches to portrait or landscape orientation. It monitors device rotation changes to detect when the display orientation changes.</pre> |
| − | This trigger will fire when the screen switches to portrait or landscape orientation. | |
| − | </pre> | |
| − | <br>
| |
| − | '''Example Usage'''<br/>
| |
| | | | |
| − | <pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
| + | ''' Options ''' |
| − | Triggers
| |
| | | | |
| | + | * '''Portrait''' - The trigger fires when the screen rotates to portrait orientation (0 or 180 degrees) |
| | + | * '''Landscape''' - The trigger fires when the screen rotates to landscape orientation (90 or 270 degrees) |
| | | | |
| − | </pre><br>
| + | ''' Examples ''' |
| − | <pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
| |
| − | Actions
| |
| | | | |
| | + | '''Example 1: Auto-brightness for video''' |
| | | | |
| − | </pre><br>
| + | Increase brightness when switching to landscape for video viewing: |
| − | <pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
| |
| − | Constraints
| |
| | | | |
| | + | <pre class="trigger-style">Triggers |
| | | | |
| − | </pre><br> | + | Screen Orientation: Landscape</pre> |
| − | <pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;"> | + | <pre class="action-style">Actions |
| − | Local variables
| |
| | | | |
| | + | Set Brightness: 100% |
| | + | Media Volume: 80%</pre> |
| | + | <pre class="constraint-style">Constraints |
| | | | |
| − | </pre><br> | + | Application Running: YouTube, Netflix</pre> |
| | + | |
| | + | '''Example 2: Restore settings on portrait''' |
| | + | |
| | + | Restore normal brightness when returning to portrait: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen Orientation: Portrait</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Brightness: Auto |
| | + | Media Volume: 50%</pre> |
| | + | |
| | + | '''Example 3: Gaming mode''' |
| | + | |
| | + | Enable gaming mode when phone is held in landscape: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen Orientation: Landscape</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Do Not Disturb: Enable |
| | + | Set Variable: [gaming_mode] = true</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Application Running: (Select game apps)</pre> |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * The trigger polls the screen orientation approximately every 1.5 seconds to detect changes |
| | + | * Portrait orientation includes both normal portrait (0 degrees) and reverse portrait (180 degrees) |
| | + | * Landscape orientation includes both normal landscape (90 degrees) and reverse landscape (270 degrees) |
| | + | * Auto-rotate must be enabled on the device for the screen to actually rotate |
| | + | * The trigger tracks orientation changes globally and fires for all macros using this trigger type |
| | + | * Resource optimization is applied so only one background polling loop runs regardless of how many macros use this trigger |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Constraint:_Device_Orientation|Device Orientation Constraint]] |