| Line 1: |
Line 1: |
| − | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">This trigger will fire when the screen is turned on or off. It monitors the device display state changes, allowing you to automate actions based on screen activity.</pre> |
| − | This trigger can be configured to fire when either the screen is turned on or turned off.
| + | |
| − | </pre> | + | ''' Options ''' |
| | + | |
| | + | * '''Screen On''' - The trigger fires when the device screen is turned on |
| | + | * '''Screen Off''' - The trigger fires when the device screen is turned off |
| | + | |
| | + | ''' Examples ''' |
| | + | |
| | + | '''Example 1: Mute media when screen off''' |
| | + | |
| | + | Automatically pause media playback when the screen turns off: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen On/Off: Screen Off</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Media Control: Pause</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Media Playing</pre> |
| | + | |
| | + | '''Example 2: Launch app on screen on''' |
| | + | |
| | + | Open a specific app whenever you turn on your screen: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen On/Off: Screen On</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Launch Application: Clock</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Time of Day: 6:00 AM - 9:00 AM</pre> |
| | + | |
| | + | '''Example 3: Track screen time''' |
| | + | |
| | + | Log screen on events for usage tracking: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen On/Off: Screen On</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Variable: [screen_on_count] = [screen_on_count] + 1 |
| | + | Log to file: "Screen turned on at [hour]:[minute]"</pre> |
| | + | |
| | + | '''Example 4: Power saving mode''' |
| | + | |
| | + | Enable power saving features when screen is off for extended periods: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Screen On/Off: Screen Off</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Wait: 5 minutes |
| | + | WiFi: Disable |
| | + | Bluetooth: Disable</pre> |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * This trigger uses a high priority broadcast receiver to ensure quick response to screen state changes |
| | + | * The trigger fires immediately when the screen state changes |
| | + | * Screen On fires before the lock screen is displayed - use the Screen Unlocked trigger if you need to wait for the device to be fully unlocked |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger:_Screen_Unlocked|Screen Unlocked]] |
| | + | * [[Constraint:_Screen_On/Off|Screen On/Off Constraint]] |
| | + | * [[Action:_Screen_On/Off|Screen On/Off]] |