Trigger: Auto Rotate changed
The Auto Rotate Changed trigger fires when the auto rotate (automatic screen rotation) setting on the device changes. This allows you to respond when the user enables or disables automatic screen rotation.
Options
- Enabled - Trigger fires when auto rotate is turned on
- Disabled - Trigger fires when auto rotate is turned off
Examples
Example 1: Notify When Auto Rotate Disabled
Triggers Auto Rotate Changed (Disabled)
Actions Toast: Screen rotation locked
Example 2: Set Orientation for Video App
Triggers Auto Rotate Changed (Enabled)
Actions Set Variable: [auto_rotate_enabled] = true
Notes
- The trigger monitors the system setting ACCELEROMETER_ROTATION to detect changes
- Only one option can be selected per trigger instance - create separate triggers if you need to respond to both enabling and disabling
- The trigger uses a ContentObserver to efficiently monitor the setting without polling
- The trigger only fires when the state actually changes (not on repeated settings to the same value)
See Also