Trigger: Music/Sound playing
The Music/Sound Playing trigger fires when music or sound playback is started or stopped on the device. This allows you to automate actions based on audio playback state, such as adjusting volume or launching related apps.
Options
- Music or Sound Started - Fires when audio playback begins on the device
- Music or Sound Stopped - Fires when audio playback stops on the device
Examples
Example 1: Increase volume when music starts playing
Triggers Music/Sound Playing: Music or Sound Started
Actions Set Volume: Media Volume 80%
Constraints Headphones: Plugged In
Example 2: Turn off Bluetooth speaker when music stops
Triggers Music/Sound Playing: Music or Sound Stopped
Actions Wait 5 minutes Disable Bluetooth
Constraints Music Playing: Not Playing Bluetooth: Connected to Bluetooth Speaker
Notes
- This trigger uses a background service (DetectMusicService) to monitor audio playback state
- The trigger detects audio from any app that uses the standard Android audio system
- "Music or Sound" includes any audio stream, not just music (e.g., podcasts, videos, games)
- The trigger fires when the audio focus state changes, which may not exactly match when you hear sound start or stop
See Also