Trigger - Volume Long Press Event

The trigger Volume Long Press Event is executed when one of the volume keys is pressed down for a longer duration or hold and then released.

Note: adb has to be used to grant a permission to Automagic to use this feature:

  1. Install adb on a computer (search internet on how to install adb)
  2. enable USB Debugging in System settings -> Developer options on your Android device
  3. connect your Android device to the computer
  4. execute following command in a terminal: adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: Activating this trigger prevents that holding the volume button for a longer duration changes the volume.
Warning: This trigger can miss Up events in case an app or dialog is shown while the volume key is held down.


  • Hold the volume down key pressed to skip to the next song.
The list of names of keys that should execute the trigger. Glob patterns (*, ?) are supported. Variables are supported.
Press Duration
The minimum amount of time that the key has to be hold to execute the trigger. The Down action will be executed when the specified duration is reached, the up action as soon as the key is released.
Whether down, up or both actions should execute the trigger.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text.
See action Script for a description.

Supplied Variables
the time the trigger executed
the numeric keycode
the name of the keycode
the duration of the event in milliseconds
the ID of the sending device
whether the action was down
whether the action was up