Components
Triggers
- Accessibility Button
- Active Network Type
- Activity Ended
- Activity Started
- Airplane Mode
- Android Wear Device Connected/Disconnected
- App Package Event
- App Task Ended
- App Task Started
- Assist
- Audio Volume
- Auto Sync State
- Automagic Notification Selected
- Automagic SMS Delivery Report Received
- Automagic Startup
- Battery Level
- Battery Level (Android Wear)
- Battery Low Condition
- Battery Saver Mode
- Bluetooth Device Connected
- Bluetooth Device Disconnected
- Bluetooth State
- Calendar
- Calendar Event
- Car UI Mode
- Clipboard Changed
- Command Output
- Compass
- Content Provider Changed
- CyanogenMod Quick Settings Tile Selected
- Daydream State
- Desk UI Mode
- Device Idle/Doze Mode
- Device Orientation
- Device Storage Space Low
- Display State
- Dock Event
- File Observer
- Fingerprint Gesture
- General Broadcast
- Gleeo Recording Started
- Gleeo Recording Stopped
- Global Variable
- Global Variable Date/Time
- Gmail Unread Conversation Count
- GPS Status Event
- Hardware Key Event
- Hardware Keyboard State
- Hardware Keyboard Type
- HTTP Request (Experimental)
- Incoming Call
- Interruptions Mode
- K-9 Mail Received
- Launch Browser App Intent Received
- Launch Calculator App Intent Received
- Launch Calendar App Intent Received
- Launch Contacts App Intent Received
- Launch Mail App Intent Received
- Launch Music App Intent Received
- Launcher Trigger
- Light Sensor
- Locale Adjusted
- Location
- Location Provider State
- Login Attempt
- Magnetic Field Sensor
- Media Button Event (Experimental)
- Media Session Changed (Experimental)
- Mobile Datanetwork Type
- Next Alarm
- NFC State
- NFC Tag
- Notification on Screen Displayed
- Notification on Statusbar Displayed
- Notification on Statusbar Removed
- Notification on Statusbar Selected
- Outgoing Call
- Periodic Location Update
- Periodic Timer
- Periodic Timer Inexact
- Phone Cell CDMA
- Phone Cell GSM
- Phone Service State
- Phone Signal Strength
- Plugin (Experimental)
- Plugin Event (Experimental)
- Power Source
- Power Source (Android Wear)
- Pressure Sensor
- Proximity Sensor
- Quick Settings Tile Selected
- Ringer Mode
- Screen Orientation
- Send/Share Intent Received
- Send/Share Multiple Intent Received
- Shake
- Shortcut
- Shortcut (Android Wear)
- Shutdown
- Significant Motion Detected
- SIM State
- SMS Received
- SMS Sent
- Sound Level (Experimental)
- Speech Web Search Requested
- Speed
- Step counter
- Storage Media Event
- System Setting Changed
- System Setting Changed (Android Wear)
- Take Note (Android Wear)
- Theater Mode (Android Wear)
- Time
- Time Adjusted
- Timezone Adjusted
- UI Event
- User Activity (Experimental)
- User Present
- View Web URL Intent Received
- Voice Command Requested
- Volume Long Press Event
- WiFi Connected
- WiFi Disconnected
- WiFi Scan Results Available
- WiFi State
- WiFi Tethering State
- Wired Headset Plugged
Conditions
- Action Sound Playing
- Active Cyanogen/LineageOS Profile
- Active Network Type
- Airplane Mode On
- Android Wear Device Connected
- App Process Running
- App Task Running
- Audio Manager Mode
- Audio Stream Active
- Audio Volume
- Auto Sync Enabled
- Auto-rotate Screen Enabled
- Battery Level
- Battery Level (Android Wear)
- Battery Level BLE (Experimental)
- Battery Saver Mode Enabled
- Biometric Authentication Dialog
- Bluetooth Device Connected
- Bluetooth Enabled
- Bluetooth LE Device Available
- Bluetooth SCO On
- Calendar Event
- Call State
- Confirmation Dialog
- Custom Widget Overlay Showing
- Debug Dialog
- Device Idle/Doze Mode Active
- Device Orientation
- Device Storage Space
- Device Storage Space Low
- Dock State
- Execution Count
- Expression
- Flashlight On
- Flow Enabled
- Flow Executing
- Gleeo is Recording
- Gmail Unread Conversation Count
- Hardware Keyboard State
- Hardware Keyboard Type
- Host Reachable
- Interruptions Mode
- Keyguard Locked
- Keyguard with Security
- Light Sensor
- Location
- Location Entering
- Location Provider Enabled
- Magnetic Field Sensor
- Microphone Mute
- Mobile Datanetwork Enabled
- Mobile Datanetwork Type
- Music Active
- Network Connected
- NFC Enabled
- Night Mode
- Notification on Statusbar Displayed
- Phone Cell CDMA
- Phone Cell GSM
- Phone Service State
- Phone Signal Strength
- Plugin (Experimental)
- Power Source Connected
- Power Source Connected (Android Wear)
- Pressure Sensor
- Proximity Sensor
- Ringer Mode
- Roaming
- Root Setting Enabled
- Screen Automatic Brightness Enabled
- Screen On
- Screen Orientation
- Service Running
- Sound Level (Experimental)
- Speakerphone On
- Telephony Radio Enabled
- Theater Mode On (Android Wear)
- Time Range
- UI Mode
- USB Tethering Enabled
- Vibrate on Ring Enabled
- WiFi Access Point Enabled
- WiFi Available
- WiFi Connected
- WiFi Signal Level
- WiFi State
- WiFi Tethering State
- Wired Headset Plugged
Actions
- Add WiFi Access Point
- Answer Ringing Call
- Call Number
- Clear Automagic Log
- Close System Dialogs
- Combine Images
- Compare Images
- Connect/Disconnect Bluetooth Device
- Control Audio Player
- Control UI
- Copy File
- Copy Files
- Copy Text from Clipboard
- Copy Text to Clipboard
- Create Calendar Event
- Create Directories
- Delete App Cache
- Delete Files
- Delete Flows
- Delete HTTP Request Cookies
- Dismiss Slide to Unlock Keyguard
- Download URL
- Dropbox Create Directories
- Dropbox Delete Files
- Dropbox Download Files
- Dropbox Init Variable File List
- Dropbox Upload File
- Dropbox Upload Files
- Enable WiFi Access Point
- End Call
- Execute Command
- Execute Flows
- Execute Root Command
- Execute SSH Command (Experimental)
- Exit Device Idle/Doze Mode
- Export Flows/Widgets
- Flashlight
- FTP Create Directories
- FTP Delete Files
- FTP Download Files
- FTP Init Variable File List
- FTP Upload File
- FTP Upload Files
- Gleeo Create Entry
- Gleeo Filesystem Export
- Gleeo Start Recording
- Gleeo Stop Recording
- Google Drive Create Directories (Experimental)
- Google Drive Delete Files (Experimental)
- Google Drive Download Files (Experimental)
- Google Drive Init Variable File List (Experimental)
- Google Drive Upload Files (Experimental)
- Hide Custom Widget Overlay
- Hide Custom Widget Overlay (Android Wear)
- HTTP Request
- Import Flows/Widgets
- Init Variable Contact List
- Init Variable File List
- Init Variable Image File
- Init Variable Image Metadata
- Init Variable Location
- Init Variable Next Alarm
- Init Variable Notifications on Statusbar
- Init Variable Package Info
- Init Variable Random Number
- Init Variable System Setting
- Init Variable System Setting (Android Wear)
- Init Variable Text File
- Init Variable WiFi Access Point List
- Init Variables Bluetooth Device List
- Init Variables Call Log
- Init Variables Contact Info
- Init Variables Device Orientation
- Init Variables File Info
- Init Variables Gleeo Project Structure
- Init Variables Gleeo Recording
- Init Variables Media Metadata
- Init Variables Media Session (Experimental)
- Init Variables Network Statistics
- Init Variables Network Traffic
- Init Variables Phone Info
- Input Dialog
- Input Speech (Android Wear)
- Input Speech (Experimental)
- Kill App
- Kill App Process
- Launch App
- Launch Shortcut
- Lock Device
- Mail with Gmail
- Map Values
- Message Dialog
- Modify Automagic Notification on Statusbar
- Modify Call Log
- Modify Image
- Modify Notification Channel
- Move Files
- Notification on Screen
- Notification on Screen (Android Wear)
- Notification on Statusbar
- Open URL in Browser
- Perform Action on Notification on Statusbar
- Plugin (Experimental)
- Post Tweet
- Post Twitter Direct Message
- Query Content Provider
- Reboot
- Remove Notification Missed Calls
- Remove Notification on Statusbar
- Remove WiFi Access Point
- Request Sync
- Reregister Media Button Receiver
- Restore Audio Volumes
- Save Variable in Image File
- Save Widget to Image File
- Scan Barcode
- Script
- Seek Action Sound
- Send Broadcast
- Send SMS
- Send USSD Request
- Send Wake on LAN Packet
- Set Airplane Mode
- Set Alarm
- Set App Notification Peekable
- Set App Notification Priority
- Set App Notification State
- Set Audio Manager Mode
- Set Audio Volume
- Set Auto Sync State
- Set Auto-rotate Screen State
- Set Battery Saver Mode
- Set Bluetooth SCO State
- Set Bluetooth State
- Set Bluetooth Tethering State
- Set Camera Usage State
- Set Car UI Mode
- Set Cyanogen/LineageOS Profile
- Set Data Roaming State
- Set Default Input Method
- Set Default Ringtone
- Set Disabled Keyguard Features
- Set Flow State
- Set GPS State
- Set Immersive Mode
- Set Interruptions Mode
- Set Keyguard State
- Set LineageOS System Setting
- Set Live Wallpaper
- Set Lock Pattern State
- Set Lock PIN/Password
- Set Microphone Mute
- Set Mobile Datanetwork State
- Set Mobile Network Mode (2G/3G)
- Set Network Location State
- Set NFC State
- Set Night Mode
- Set Proximity Screen Off State
- Set Restrict Background Data State
- Set Ringer Mode
- Set Screen Brightness
- Set Screen Orientation
- Set Screen Timeout
- Set Speakerphone State
- Set System Locale
- Set System Setting
- Set System Setting (Android Wear)
- Set Telephony Radio State
- Set Timer
- Set USB Debugging State
- Set USB Tethering State
- Set Vibrate on Ring State
- Set Wallpaper
- Set WiFi Access Point Priority
- Set WiFi Sleep Policy
- Set WiFi State
- Set WiFi State (Android Wear)
- Set WiFi Tethering State
- Show Call Log
- Show Control UI Gesture Recorder
- Show Control UI Infos
- Show Custom Widget Overlay
- Show Custom Widget Overlay (Android Wear)
- Show Home Screen
- Show Input Method Selector
- Shutdown
- Silence Ringer
- Sleep
- Snooze Notification on Statusbar
- Sound
- Speech Output
- Start Activity
- Start Daydream
- Start Recording Audio
- Start Recording Screen (Experimental)
- Start Service
- Stop Action Sound
- Stop Action Speech Output
- Stop Flows
- Stop Recording Audio
- Stop Recording Screen (Experimental)
- Store Audio Volumes
- Take Picture
- Take Screenshot (Experimental)
- Turn Screen On
- Turn Screen On (Android Wear)
- Unzip Files
- Update Media Database (Experimental)
- Update Quick Settings Tile
- Vibrate
- Vibrate (Android Wear)
- Voice Search (Experimental)
- WiFi Reassociate
- WiFi Scan
- Write HTTP Response File (Experimental)
- Write HTTP Response Text (Experimental)
- Write to File
- Write to Log
- Zip Files
Triggers

The trigger Accessibility Button is executed when the additional button on the navigation bar is clicked. Only devices that provide the navigation bar with software buttons support this trigger.
Examples:
- Execute an important flow from within nearly every app directly.
See action Script for a description.
triggertime

The trigger Active Network Type executes a flow when the active network type changes to another type.
See action Script for a description.
triggertime
network_type
network_type_name
WIFI
or MOBILE
network_subtype
network_subtype_name
network_state
network_detailed_state
network_extra_info
network_reason

The trigger Activity Ended is executed when an activity is moved to the background.
See action Script for a description.
triggertime
package_name
app_name
activity_class
activity_name

The trigger Activity Started is executed when an activity is moved to the foreground.
Examples:
- Increase the display brightness when Google Maps is started.
See action Script for a description.
triggertime
package_name
app_name
activity_class
activity_name

The trigger Airplane Mode is executed when the airplane mode is turned on or off.
Example:
- Disable all flows that are downloading data when the airplane mode is turned on.
See action Script for a description.
triggertime

The trigger Android Wear Device is executed when an Android Wear device is connected or disconnected from the main device.
Examples:
- Play an alert sound when the Wear watch is disconnected from the main device.
See action Script for a description.
triggertime
node_id

The trigger App Package Event is executed when a app/package is installed, updated or removed.
Examples:
- Write the date and time of an app update to a log file for reference.
- Added: A new package has been installed
- Changed: A component of a package has been enabled/disabled
- Data cleared: The data of the app has been cleared
- Replaced: A package has been updated
- Restarted: A package has been restarted and all processes of the package have been killed
- Removed: A package was removed or is in the process of being updated
- Fully removed: A package has been uninstalled (and data deleted) (Android 4)
See action Script for a description.
triggertime
package_name
app_name
uid
replacing
changed_component_name_list
dont_kill_app
data_removed

The trigger App Task Ended is executed when an application is moved to the background or closed respectively the user moved the focus to another app.
The application might still be running in the background or the process hosting the application might still be in memory.
Examples:
- Raise the media volume back to normal when you leave the browser.
- Change the display brightness back to normal when you don't use Google Maps anymore.
See action Script for a description.
triggertime
package_name
app_name

The trigger App Task Started is executed when an application is moved to the foreground or opened respectively the user moved the focus to this app.
Examples:
- Lower the media volume when you open the browser.
- Raise the display brightness when you start using Google Maps.
See action Script for a description.
triggertime
package_name
app_name

The trigger Assist is executed when the home button is long-pressed or dragged upwards (Galaxy Nexus) or the home button is long-pressed and the middle icon is selected (S3).
Warning: This function requires Android 4.1+ and is not officially supported by Android.
See action Script for a description.
triggertime

The trigger Audio Volume is executed when the volume of the device has been changed. Some devices report the volume change slightly delayed.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Vibrate whenever the volume is changed.
See action Script for a description.
triggertime
volume
old_volume

The trigger Auto Sync State is executed when the auto sync setting is changed to on or off.
Examples:
- Turn an hourly executed download flow off when auto sync is disabled.
Execute the flow when the auto sync has been turned on.
Off
Execute the flow when the auto sync has been turned off.
See action Script for a description.
triggertime

The trigger Automagic Notification Selected executes a flow when the Automagic-wand notification available in the statusbar is selected.
See action Script for a description.
triggertime

The trigger Automagic SMS Delivery Report Received is executed when an asynchronous delivery report was received.
Note: Multiple delivery reports can be received per SMS, for example a status 48 (delivery pending) and later status 0 (OK) when the SMS was delivered.
Examples:
- Send an SMS one more time when the delivery report indicates an error.
See action Script for a description.
triggertime
sms_receiver
sms_text
sms_delivery_report_status

The trigger Automagic Startup is executed when the Automagic service is completely started and the flows have been loaded.
Examples:
- Initialise global variables to default values when Automagic started.
See action Script for a description.
triggertime

The trigger Battery Level is executed whenever the battery level changes and the built in condition about the level holds true.
Examples:
- Lower the display brightness when the battery level falls below 50%.
- Turn off WiFi when the battery level falls below 30%.
becomes lower than
Executes the flow when the last reported percentage was above the defined level and the current percentage is below the defined level
becomes higher than
Executes the flow when the last reported percentage was below the defined level and the current percentage is above the defined level
becomes equal to
Executes the flow when the last reported percentage was different than the defined level and the current percentage equals the defined level
becomes full
Executes the flow when the last reported battery status was not full and is now full
lower than
Executes the flow whenever the reported percentage by the system is below the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
higher than
Executes the flow whenever the reported percentage by the system is above the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
exactly
Executes the flow whenever the reported percentage by the system is exactly on the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
full
Executes the flow whenever the reported battery status by the system is full. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last status has been already full.
See action Script for a description.
triggertime
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
battery_charge_counter
(Android 5+)battery_current_now
(Android 5+)battery_current_average
(Android 5+)battery_energy_counter
(Android 5+)
The trigger Battery Level (Android Wear) is executed whenever the battery level changes and the built in condition about the level holds true.
Examples:
- Lower the display brightness when the battery level falls below 50%.
- Turn off WiFi when the battery level falls below 30%.
becomes lower than
Executes the flow when the last reported percentage was above the defined level and the current percentage is below the defined level
becomes higher than
Executes the flow when the last reported percentage was below the defined level and the current percentage is above the defined level
becomes equal to
Executes the flow when the last reported percentage was different than the defined level and the current percentage equals the defined level
becomes full
Executes the flow when the last reported battery status was not full and is now full
lower than
Executes the flow whenever the reported percentage by the system is below the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
higher than
Executes the flow whenever the reported percentage by the system is above the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
exactly
Executes the flow whenever the reported percentage by the system is exactly on the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last percentage has been the same.
full
Executes the flow whenever the reported battery status by the system is full. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last status has been already full.
See action Script for a description.
triggertime
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
node_id

The trigger Battery Low Condition is executed when the battery level becomes low or when the battery level becomes OK again after it was low.
Examples:
- Lower the display brightness when the battery level becomes low.
- Turn off WiFi when the battery level becomes low.
- Turn on WiFi when the battery level becomes OK again.
The battery level becomes low (the exact value can differ between different devices).
OK
The battery level becomes OK again (the exact value can differ between different devices).
See action Script for a description.
triggertime

The trigger Battery Saver Mode is executed when the battery saving mode of the device is changed (Android 5+).
Warning: This function does not work for manufacturer specific battery saving modes like Samsungs (Ultra-)energy saving mode or Sony and HTC specific modes. Please use action System Setting Changed on such devices.
Examples:
- Turn off a few flows when the battery saver is activated.
See action Script for a description.
triggertime

The trigger Bluetooth Device Connected is executed when a bluetooth device is connected.
Examples:
- Turn down the volume when a bluetooth headset is connected.
See action Script for a description.
triggertime
name
address
bluetooth_class
bond_state

The trigger Bluetooth Device Disconnected is executed when a bluetooth device is disconnected.
Examples:
- Turn up the volume when a bluetooth headset is disconnected.
See action Script for a description.
triggertime
name
address
bluetooth_class
bond_state

The trigger Bluetooth State is executed when the bluetooth adapter of the device is turned on or off depending on the settings used.
Examples:
- Enable some flows using the bluetooth adapter as soon as the bluetooth is turned on.
See action Script for a description.
triggertime
previous_bluetooth_state
bluetooth_state

The trigger Calendar is executed on the defined date and time.
Examples:
- Send a reminder mail on the last Friday of each month.
- Export and mail your time tracking data on the first Monday of each month.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime

The trigger Calendar Event is executed when an event on the calendar starts or ends.
Examples:
- Mute the ringer when a meeting starts.
- Vibrate 5 minutes before a meeting starts.
- Start recording a task in Gleeo Time Tracker when a meeting starts.
*
and ?
.*
and ?
.Examples:
Plan*
matches titles likePlanning
,Plan B
etc.
*
and ?
.*
and ?
.This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime
event_calendar
event_title
event_description
event_location
event_start
event_end
event_all_day
event_availability
event_id

The trigger Car UI Mode is executed when the device is put into car UI mode when placed in a car dock.
Examples:
- Raise the audio volume when the device is put into the car dock.
When selected executes the flow when the device is put into car UI mode.
Exit
When selected executes the flow when the car UI mode has been ended.
See action Script for a description.
triggertime

The trigger Clipboard Changed is executed when the content of the clipboard changes.
Use the action Copy Text from Clipboard to access the content of the clipboard.
See action Script for a description.
triggertime
clip_data

The trigger Command Output is executed when a command prints a line containing a specific text.
/bin/sh
to be interpreted or to su
when as root is checked.
See action Script for a description.
triggertime
stdout
stderr
output
output_type
stdout
when the triggering line was written to stdout, stderr otherwise
The trigger Compass executes the flow when the device changes its orientation.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples:
- Play a beep sound when the device is heading north.
- Periodic: executes the flow in periodic time intervals
- On Change: executes the flow when the orientation changed for at least some degrees.
- On Relative Sector Change: Remembers the device orientation when this trigger is enabled first, divides the orientation into the specified number of equal sectors and executes the flow whenever the device stays in a different sector.
Example:
When 4 sectors are desired the 360° possible degrees are divided into 4 sectors with an opening angle of 90° each. The sectors are relative to the initial device orientation when the trigger was enabled.
- Sector 1: 315° to 45°
- Sector 2: 45° to 135°
- Sector 3: 135° to 225°
- Sector 4: 225° to 315°
See action Script for a description.
triggertime
azimuth
pitch
roll
azimuth_sector
(On Relative Sector Change only)pitch_sector
(On Relative Sector Change only)roll_sector
(On Relative Sector Change only)
The trigger Content Provider Changed is executed whenever the content provider is changed for the specified URI. Note that not all content providers support this feature.
Examples:
- Get notified whenever the MMS database changes so you can check if there's a new message.
See action Script for a description.
triggertime
content_uri

The trigger CyanogenMod Quick Settings Tile Selected creates a quick settings tile and is executed when the tile is selected/clicked.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Create a QS tile to send an SMS with the current location.
See action Script for a description.
triggertime

The trigger Daydream State is executed when the daydream of the system starts or stops.
See action Script for a description.
triggertime

The trigger Desk UI Mode is executed when the device is put into desk UI mode when placed in a desk dock.
Examples:
- Raise the audio volume when the device is put into the desk dock.
When selected executes the flow when the device is put into desk UI mode.
Exit
When selected executes the flow when the desk UI mode has been ended.
See action Script for a description.
triggertime

The trigger Device Idle/Doze Mode is executed when the device falls into idle/doze mode or is woken up from this mode.
Examples:
- Deactivate some less important flows when the device enters idle/doze mode.
See action Script for a description.
triggertime

The trigger Device Orientation executes the flow when the device is moved to the defined orientation.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples:
- Reduce the ringer volume when the device screen is facing down.
- Face down: The display of the device is facing down for example when lying on a table with the display towards the table.
- Face up: The display of the device is facing up for example when lying on a table with the display facing away from the table.
- Face left: The display faces to the left with the longer side lying on a table when the upper edge of the device is pointing away from you.
- Face right: The display faces to the right with the longer side lying on a table when the upper edge of the device is pointing away from you.
- Standing upright: The device is standing upright on a table.
- Standing upside-down: The device is standing upside-down on a table.
See action Script for a description.
triggertime

The trigger Device Storage Space Low executes the flow when the internal device storage space becomes low or the free storage space is back to a normal level.
Note: The amount of free space to consider as low is defined by the device manufacturer.
Standard Android considers less than 10% of free internal memory as low.
- Play a warning sound when the device storage space is low.
Executes the flow when the storage space becomes low.
becomes OK
Executes the flow when the storage space is back to a normal level.
See action Script for a description.
triggertime

The trigger Display State is executed when the display is turned on or off.
Examples:
- Turn on WiFi when you turn the display on. Turn WiFi off when you turn the display off.
- Count how many times a day you turn your display on.
- Remind you with a sound alert when you are recording your time and you are starting to use the device.
Execute the flow when the display has been turned on.
Off
Execute the flow when the display has been turned off.
See action Script for a description.
triggertime

The trigger Dock Event is executed when the device is put into a dock (car, desk, some external hardware keyboard).
The dock type can be distinguished using a condition Dock State.
Examples:
- Raise the audio volume when the device is put into a dock.
When selected executes the flow after the device has been put into a dock.
Undocked
When selected executes the flow after the device has been removed from a dock.
See action Script for a description.
triggertime
dock_state

The trigger File Observer is executed when a path of interest on the filesystem is accessed or changed.
Examples:
- Create a copy of a file after it has been modified.
- Upload a new image to Dropbox when a new subfile is created in folder
/sdcard/DCIM/Camera/
.
- File accessed: Data was read from a file
- Modify: Data was written to a file
- Metadata changed: Metadata (permissions, owner, timestamp) was changed explicitly
- Writable file closed: Someone had a file or directory open for writing, and closed it
- Unwritable file closed: Someone had a file or directory open read-only, and closed it
- File opened: A file or directory was opened
- File moved from: A file or subdirectory was moved from the monitored directory
- File moved to: A file or subdirectory was moved to the monitored directory
- Subfile created: A new file or subdirectory was created under the monitored directory
- Subfile deleted: A file was deleted from the monitored directory
- Delete Self: The monitored file or directory was deleted; monitoring effectively stops
- Self moved: The monitored file or directory was moved; monitoring continues
See action Script for a description.
triggertime
registered_path
event
- File accessed: 1 (0x00000001)
- Modify: 2 (0x00000002)
- Metadata changed: 4 (0x00000004)
- Writable file closed: 8 (0x00000008)
- Unwritable file closed: 16 (0x00000010)
- File opened: 32 (0x00000020)
- File moved from: 64 (0x00000040)
- File moved to: 128 (0x00000080)
- Subfile created: 256 (0x00000100)
- Subfile deleted: 512 (0x00000200)
- Delete Self: 1024 (0x00000400)
- Self moved: 2048 (0x00000800)
path

The trigger Fingerprint Gesture executes a flow when one of the supported gestures is executed on the fingerprint sensor.
Note: Enabling a trigger of this type can prevent other fingerprint apps from handling fingerprint gestures. Please note that this trigger becomes temporarily unavailable when an app or the system requests to scan a fingerprint.
Examples:
- Use a swipe down gesture to show notifications and a left swipe to simulate a back press.
See action Script for a description.
triggertime

The trigger General Broadcast dynamically registers a broadcast receiver at runtime with the specified intent filter.
Please also see the Android Developer Documentation.
Examples:
-
Receive the current WiFi signal strength (only when the display is turned on):
Action:android.net.wifi.RSSI_CHANGED
Access Intent Extras:value=getInt("newRssi", 0);
http
, content
etc.).host:port
).Following functions are supported:
getString(String key)
getChar(String key, String defaultValue)
getBoolean(String key, Boolean defaultValue)
getFloat(String key, Number defaultValue)
getDouble(String key, Number defaultValue)
getByte(String key, Number defaultValue)
getShort(String key, Number defaultValue)
getInt(String key, Number defaultValue)
getLong(String key, Number defaultValue)
getBundle(String key)
getUri(String key)
getBooleanArray(String key)
getByteArray(String key)
getShortArray(String key)
getCharArray(String key)
getIntArray(String key)
getIntegerArrayList(String key)
getLongArray(String key)
getFloatArray(String key)
getDoubleArray(String key)
getStringArray(String key)
getUriArray(String key)
getUriArrayList(String key)
getParcelableAsString(String key)
getParcelableArrayAsString(String key)
getParcelableArrayListAsString(String key)
getParcelable(String key)
Examples:
value = getString("key1"); value = getBoolean("key2", true); value = getDouble("key3", 1.23); value = getInt("key4", 42); value = getInt("key5", a+4*b);Data of intents wrapped in a Bundle-extra can be accessed using function
getBundle(String name)
.Values contained in a bundle can be accessed with the functions used to accessed regular extras but by additionally specifying the bundle.
Example:
bundle = getBundle("key1"); value = getString(bundle, "key2");compact form:
value = getString(getBundle("key1"), "key2");Example to access the track info of PowerAMP:
track_info = getBundle("track"); artist = getString(track_info, "artist"); album = getString(track_info, "album"); title = getString(track_info, "title"); path = getString(track_info, "path"); duration = getInt(track_info, "dur", 0);
See action Script for a description.
triggertime
action
data_string
categories
scheme
type

The trigger Gleeo Recording Started is executed when a task in Gleeo Time Tracker has been started.
See action Script for a description.
triggertime
domain_name
project_title
task_name
start

The trigger Gleeo Recording Stopped is executed when a task in Gleeo Time Tracker has been stopped.
See action Script for a description.
triggertime
domain_name
project_title
task_name
start
end

The trigger Global Variable is executed when a different value is assigned to a global variable. The trigger is not executed when the same value is assigned to the variable again.
Examples:
- Show a reminder when you sent more than 10 SMS in one day.
See action Script for a description.
triggertime
old_
name_of_the_global_variable
The trigger Global Variable Date/Time is executed when the point of time stored in the global variable is reached.
Examples:
- Execute a flow daily on sunrise/sunset.
- Execute a flow in irregular intervals.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime

The trigger Gmail Unread Conversation Count is executed when the count of unread conversations in the Gmail app on the device changes.
Examples:
- Play a notification sound, when more unread conversations are available.
See action Script for a description.
triggertime
count
old_count

The trigger GPS Status Event is executed, when the system start or stops to use GPS.
Examples:
- Vibrate when the system begins to use GPS for information purposes.
- Started: executes the trigger when the system starts to use GPS
- Stopped: executes the trigger when the system stops to use GPS
- First fix received: executes the trigger when the system uses GPS and the first fix has just been determined
- Satellite status changed: executes the trigger when the satellite status changes (usually very frequent)
See action Script for a description.
triggertime
gps_event_type
satellites
time_to_first_fix

The trigger Hardware Key Event is executed when the specified key is pressed/released. Most devices usually only provide hardware keys for volume up and volume down. The power key can usually not be intercepted.
Examples:
- Scroll down in a browser window when the volume down key is pressed.
See action Script for a description.
triggertime
key_code
key_code_name
key_duration
key_source_device_id
key_action_down
key_action_down

The trigger Hardware Keyboard State is executed when the hardware keyboard is opened or closed.
Examples:
- Vibrate when the hardware keyboard is opened.
See action Script for a description.
triggertime
keyboard_type

The trigger Hardware Keyboard Type is executed when the type of hardware keyboard changes to one of the selected types.
Examples:
- Increase the display timeout when a hardware keyboard is connected.
See action Script for a description.
triggertime
keyboard_type

The trigger HTTP Request (Experimental) is executed when a HTTP request is received using the specified path and port.
Note: The built-in webserver is neither fast nor should you try to upload large files. Please don't use it to run webshops, corporate websites or sites like Slashdot on your phone.
Examples:
- Send an SMS from your Phone using your PC when the URL
http://192.168.1.XX:8080/sms?receiver=12345&text=test
is requested. - Return a page with the list of files on the SD card when the URL
http://192.168.1.XX:8080/files/xyz
is requested.
Examples:
/automagic/test
/automagic/files/*
to handle all paths that start with/automagic/files/
Examples: The first trigger is preferred when two triggers with paths
/automagic/test
and /automagic/*
are available.
See action Script for a description.
triggertime
remote_host
remote_port
request_path
/automagic/test
)method
header_*
header_
and the name of the header by replacing dash with underscore and converting the name to lowercase.Examples:
- Header
Accept
is stored in variableheader_accept
- Header
Accept-Encoding
is stored in variableheader_accept_encoding
param_*
param_
and the name of the parameter by converting the name to lowercase.Example:
- Parameter
test
is stored in variableparam_test
file_*
file_
and the name of the parameter by converting the name to lowercase.Example:
- Parameter
File
is stored in a variablefile_file
http_headers
http_params
http_files

The trigger Incoming Call is executed when a call is received depending on the criteria defined in the options.
Examples:
- Start recording in Gleeo Time Tracker when your employer calls.
- Send a mail containing the callers number and time to your mail account.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples:
- +17001111111
- +17001111111,+17002222222
- *70033311*
- *70033311*,*70033?22*
+
, -
and .
are removed before comparing the number.Warning: The formatting of the incoming number depends on the operator in use. Some operators format the number as an international callnumber like +17001111111, local fixed line network numbers often use the local format.
You have to check the log file to see the exact formatting used or you can add an action Notification on Screen with text
{incoming_number}
to see the actual number.See action Script for a description.
triggertime
incoming_number
call_state
call_missed_rejected
contact_name
contact_company
contact_title
contact_note
contact_nickname
contact_email
contact_groups

The trigger Interruptions Mode is executed when the device switches to the desired interruption mode.
Examples:
- Disable some flows when no interruptions are allowed.
See action Script for a description.
triggertime

The trigger K-9 Mail Received is executed when K-9 Mail receives a mail.
Examples:
- Play an alert sound when you receive a mail from the boss.
See action Script for a description.
triggertime
k9_account
k9_folder
k9_to
k9_from
k9_from_self
k9_subject
k9_sent_date
k9_cc
k9_bcc

The trigger Launch Browser App Intent Received is executed when an app or the system wants to launch a browser app.
Examples:
- Detect when the browser key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launch Calculator App Intent Received is executed when an app or the system wants to launch a calculator app.
Examples:
- Detect when the calculator key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launch Calendar App Intent Received is executed when an app or the system wants to launch a calendar app.
Examples:
- Detect when the calendar key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launch Contacts App Intent Received is executed when an app or the system wants to launch a contacts/address book app.
Examples:
- Detect when the contacts key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launch Mail App Intent Received is executed when an app or the system wants to launch a browser app.
Examples:
- Detect when the mail key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launch Music App Intent Received is executed when an app or the system wants to launch a music app.
Examples:
- Detect when the music key is pressed on a hardware keyboard.
See action Script for a description.
triggertime

The trigger Launcher Trigger is executed when the launcher entry with the name Launcher Trigger is manually started or when another app launches the entry.
Examples:
- Start a flow with the Bixby button.
See action Script for a description.
triggertime

The trigger Light Sensor is executed when the measured surrounding light intensity passes the defined value.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
See action Script for a description.
triggertime
light_level

The trigger Locale Adjusted is executed when the locale has been changed in the system.
See action Script for a description.
triggertime
locale

The trigger Location is executed when the location is entering the defined region or exiting the defined region.
The accuracy of the location depends heavily on the available location provider.
Tip: Enabling GPS in the phone settings can yield much better location accuracy but might use more battery. Locations with WiFi access points might work accurate enough and GPS can be disabled in the global phone settings to reduce battery strain.
Examples:
- Start recording in Gleeo Time Tracker when you are in the office, stop recording when you leave.
- Switch the ringer to vibrate when you are at your office.
- Turn off the ringer in the church. (Do it manually when it is important!)
- Send an SMS when you are home.
Note: The location is usually checked every 4 minutes when the device is not actively used and the classic method is used. This can result in the GPS icon on the statusbar being visible every 4 minutes. Entering/exiting a location can be missed when you are moving fast through a location with a small radius and the 4 minute check misses the location. Locations can be reported more often when the device is active or another application also uses the location features (for example when using Google Maps).
Modern uses the new geofence API provided by Google and should be tuned to use only a minimum amount of battery power.
The algorithms to detect the locations are not known and can vary depending on device model. Please experiment with both methods to see what works best for you.
See action Script for a description.
triggertime
location
location_name
entering

The trigger Location Provider State is executed when a location provider (GPS or Network) is enabled or disabled.
Examples:
- Deactivate a flow that uses GPS when GPS is turned off.
See action Script for a description.
triggertime

The trigger Login Attempt is executed, whenever someone unsuccessfully tries to login to the device respectively tries to unlock the device.
Examples:
- Take a picture with the front camera when someone enters the wrong PIN code three times.
- Failed: executes the trigger when the login attempt fails
- Successful after failed: executes the trigger when the login attempt was successful after it failed one or multiple times before
- On every failed attempt: executes once for every failed attempt
- On the Nth failed attempt: executes the trigger exactly once when the number of failed login attempts reach the specified amount of times
See action Script for a description.
triggertime
failed_login_attempt

The trigger Magnetic Field Sensor is executed when the measured magnetic field strength passes the defined value.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples:
- Execute a flow when the device is placed near a magnet.
See action Script for a description.
triggertime
magnetic_field_strength

The trigger Media Button Event (Experimental) executes a flow when the system detects a media button event, for example when the play-button is pressed on a headset.
Warning: When an audio player is launched, future events are usually sent to the audio player and not to Automagic anymore. If this is not the desired behaviour, Automagic has to be registered to receive the events again using an action Reregister Media Button Receiver.
Wired headsets usually generate the event Headset Hook.
See action Script for a description.
triggertime
key_code
key_code_name
(Android 3.1+)key_duration
key_source_device_id

The trigger Media Session Changed (Experimental) is executed when the media session of the specified player changes (new track is played, media image is loaded etc.). A regular change in position alone does not invoke the trigger.
Examples:
- Show the title of the current track in an overlay widget.
See action Script for a description.
triggertime
playback_state
playback_position
title
subtitle
description
icon
icon_uri
media_duration

The trigger Mobile Datanetwork Type is executed when the network type switches to one selected in the list.
Examples:
- Play an alert sound when the network switches to GPRS.
See action Script for a description.
triggertime
previous_mobile_network_type
mobile_network_type

The trigger Next Alarm is executed when the next alarm set in the Android alarm app is reached.
Warning: This function is not officially supported by Android < 5.0 and might not work on all devices.
Examples:
- Start the coffee machine when you are woken up in the morning.
See action Script for a description.
triggertime

The trigger NFC State is executed when the NFC adapter of the device is turned on or off depending on the settings used.
See action Script for a description.
triggertime
nfc_state

The trigger NFC Tag executes the flow when an NFC tag is detected.
You can either write a special ID to the NFC tag that will be used to identify the tag and execute the flow (this is the recommended option to use when you have a writable NFC tag) or you can also read the ID of an existing NFC tag. This is especially useful for read-only NFC tags like the ones often found in credit cards or read-only NFC tags (Live Tags, Smart Tags etc.) of some device manufacturers. Please also check the Tip
in the settings section of this page.
Note: Not all NFC tags are supported.
Examples:
- Turn on the airplane mode when an NFC tag in the bedroom is scanned.
Multiple IDs can be written to the tag but the tag IDs must contain only regular characters, underscore and numbers.
Option Write alternate tag information on the writer screen allows to define whether or not different type of information should be written to the NFC tag. Some devices show a warning dialog when a regular Automagic NFC tag is scanned since the tag contains a Web-URL. Writing an alternate tag uses a different URL that avoids this warning message.
Android 4+: Option Include Android Application Record on the writer screen allows to define whether or not an additional AAR (Android Application Record) should be written to the tag. An AAR uses slightly more space on the NFC tag but ensures that the tag is preferably handled by Automagic and not by another app.
Tip: Some devices contain apps that can handle generic NFC tags and are shown in a selection list when an NFC tag is scanned. Uninstall or deactivate unused apps when the selection dialog bugs you. You can deactivate apps in the system settings on an Android 4+ device (System settings->Apps->All, Select the app->Deactivate).
For example, you can disable the app Tags on a Galaxy Nexus to prevent the selection list from showing.
See action Script for a description.
triggertime
nfc_tag_ids

The trigger Notification on Screen Displayed is executed when a notification is displayed on the screen.
Note: At least Android 4.0 (ICS) is required.
Examples:
- Read out the text of a notification.
See action Script for a description.
triggertime
notification_message
package_name
app_name

The trigger Notification on Statusbar Displayed is executed when a notification is displayed in the statusbar.
Examples:
- Turn the screen on when Gmail app receives a mail.
A notification is considered regular when the notification is not marked as ongoing by the posting app.
A notification is marked as an ongoing event by the application that posts the notification and is usually set when a notification shows some progress like a file download, an app is playing a sound, or an app is running as a foreground service.
A group summary is an additional notification that is used to group several related notifications together.
See action Script for a description.
triggertime
title
content_title
content_title_big
notification_text
(This function is not officially supported by Android and does not work with all notifications)notification_text_big
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_channel_id
(Android 8.0+)notification_priority
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_large_icon
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_when
notification_number
notification_vibrate_default
notification_vibrate_pattern
notification_sound_default
notification_sound_uri
notification_people
(Android 4.4+)notification_info_text
(Android 4.4+)notification_sub_text
(Android 4.4+)notification_summary_text
(Android 4.4+)notification_progress
(Android 4.4+)notification_progress_max
(Android 4.4+)notification_progress_indeterminate
(Android 4.4+)notification_text_lines
(Android 4.4+)notification_background_image_uri
(Android 5+)notification_category
(Android 5+)notification_accent_color
(Android 5+)notification_ticker_text
notification_visibility
(Android 5+)notification_ongoing
notification_foreground_service
notification_local_only
notification_group
(Android 7+)notification_is_group_summary
(Android 7+)package_name
app_name
id
(Android 4.3+)buttons
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)wearable_actions
(Android 4.4+, This function is not officially supported by Android and does not work with all notifications)
The trigger Notification on Statusbar Removed is executed when a notification is removed from the statusbar.
Examples:
- Disable mobile data access when a music app displaying a notification is stopped.
A notification is considered regular when the notification is not marked as ongoing by the posting app.
A notification is marked as an ongoing event by the application that posts the notification and is usually set when a notification shows some progress like a file download, an app is playing a sound, or an app is running as a foreground service.
A group summary is an additional notification that is used to group several related notifications together.
See action Script for a description.
triggertime
title
content_title
content_title_big
notification_text
(This function is not officially supported by Android and does not work with all notifications)notification_text_big
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_channel_id
(Android 8.0+)notification_when
notification_number
notification_vibrate_default
notification_vibrate_pattern
notification_sound_default
notification_sound_uri
notification_people
(Android 4.4+)notification_info_text
(Android 4.4+)notification_sub_text
(Android 4.4+)notification_summary_text
(Android 4.4+)notification_progress
(Android 4.4+)notification_progress_max
(Android 4.4+)notification_progress_indeterminate
(Android 4.4+)notification_text_lines
(Android 4.4+)notification_background_image_uri
(Android 5+)notification_category
(Android 5+)notification_accent_color
(Android 5+)notification_ticker_text
notification_visibility
(Android 5+)notification_ongoing
notification_foreground_service
notification_local_only
notification_group
(Android 7+)notification_is_group_summary
(Android 7+)package_name
app_name
id
(Android 4.3+)
The trigger Notification on Statusbar Selected executes the flow when a notification is selected that was previously shown using action Notification on Statusbar.
- Show a notification when the airplane mode is enabled by a flow. Turn airplane mode manually off when the notification in the statusbar is selected.
Creates a new notification on the statusbar.
Trigger on Notification from Action
Trigger the flow when a notification supplied by action Notification on Statusbar was selected.
Custom icons are supported starting with Android 6.
Note: Android will usually show all non-transparent parts as white so it's recommended to create custom PNG images with a transparent background and a white color to paint the contents.
Note: Option 'Custom icon' can lead to crashes on some devices with Android 6.0.
Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action:
action_number
: contains the number of the action (1, 2 or 3)action_text
: the text label of the selected action button on the notification
See action Script for a description.
triggertime
notification_title
notification_message
notification_id

The trigger Outgoing Call is executed when an outgoing call is made and the criteria defined in the options match.
Examples:
- Start recording in Gleeo Time Tracker when you call your employer.
- Send a mail containing the called number and time to your mail account.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples:
- +17001111111
- +17001111111,+17002222222
- *70033311*
- *70033311*,*70033?22*
+
, -
and .
are removed before comparing the number.Warning: Verify that the called number is formatted to your expectations.
You have to check the log file to see the exact formatting used or you can add an action Notification on Screen with text
{called_number}
to see the actual number.See action Script for a description.
triggertime
called_number
call_state
contact_name
contact_company
contact_title
contact_note
contact_nickname
contact_email
contact_groups

The trigger Periodic Location Update is executed in periodic intervals and delivers a location to the executed flow.
The accuracy of the location heavily depends on the selected location provider.
Tip: The higher the time interval between updates the less battery will be used. A frequency of about 4 minutes is recommended.
Examples:
- Record the location every 5 minutes to a file.
- Send an SMS with your location every hour to someone.
Network
This provider uses the location provided by the cell tower and Wi-Fi signals. Depending on environment this provider can deliver location of about 60 meters of accuracy. Locations found using the cell tower can be very inaccurate (up to several kilometers or miles).
Passive
This provider delivers the location from the currently active provider (Network or GPS) without activating one of the providers by itself. This might result in very infrequent location updates.
GPS
This provider delivers the location using the GPS receiver. This provider usually uses more battery than the network provider.
High Accuracy (Experimental)
This provider delivers the finest available location using different sensors available on the device.
Balanced Power/Accuracy (Experimental)
This provider delivers the a location with an accuracy of about 100m and uses less battery than the high accuracy provider.
Low Power (Experimental)
This provider delivers the a location with an accuracy of about 10km.
No Power (Experimental)
This provider will only deliver locations when another app on the device has requested locations.
A location provider (for example GPS) can ignore the specified frequency and deliver updates every few seconds.
This can be useful to filter out locations calculated using the cell tower when also more exact locations using WiFi are available.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime
location
location_accuracy
location_altitude
location_bearing
location_speed

The trigger Periodic Timer is executed in the specified interval.
Examples:
- Remind about a recording task in Gleeo Time Tracker every 5 minutes.
Disabling this option saves a bit of battery but delays the trigger invocation for an unknown amount of time when the devices is asleep.
If this option is not set, the interval starts at the moment when the trigger is enabled.
Examples when a flow is activated at 07:13:
- Option not set, Interval 1h: Flow executes at 08:13, 09:13, 10:13, ...
- Option set, Interval 1h: Flow executes at 08:00, 09:00, 10:00, ...
- Option set, Interval 1h, Time range 07:00 - 09:00: Flow executes at 08:00, 09:00 (next day: 07:00, 08:00, 09:00)
- Option set, Interval 1h, Time range 07:30 - 09:30: Flow executes at 07:30, 08:30, 09:30
Note that disabling Wake device when in sleep mode can delay the execution when the device is in deep sleep.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime

The trigger Periodic Timer Inexact is executed approximately in the specified interval. The device can adjust the time of the trigger a bit and call the trigger when the device is currently also executing other tasks. This trigger uses less battery than the regular trigger Periodic Timer
Examples:
- Check approximately once an hour if a server is online.
Disabling this option saves a bit of battery but delays the trigger invocation for an unknown amount of time when the devices is asleep.
See action Script for a description.
triggertime

The trigger Phone Cell CDMA is executed when the device connects or disconnects from the defined cells. Changes within the defined list of cells don't invoke the trigger.
Warning: Some devices don't report the cell to Automagic when the screen is turned off.
Examples:
- Turn WiFi on, when the device connects to one of the cells at home.
See action Script for a description.
triggertime
cell_id
base_station_id
network_id
system_id
base_station_latitude
base_station_longitude
last_cell_id
last_base_station_id
last_network_id
last_system_id
last_base_station_latitude
last_base_station_longitude
connected
disconnected

The trigger Phone Cell GSM is executed when the device connects or disconnects from the defined cells. Changes within the defined list of cells don't invoke the trigger.
Warning: Some devices don't report the cell to Automagic when the screen is turned off.
Examples:
- Turn WiFi on, when the device connects to one of the cells at home.
See action Script for a description.
triggertime
lac
cid
psc
last_lac
last_cid
last_psc
connected
disconnected

The trigger Phone Service State is executed when the device detects the specified state.
Warning: Some devices don't send the current service state to applications when the screen is turned off. You can periodically use the action Turn Screen On to mitigate this problem.
Examples:
- Play a warning sound when no service is available.
Execute the flow when the telephony is back to regular operation.
Out of Service
Execute the flow when telephony becomes unavailable.
Emergency Only
Execute the flow when only emergency numbers can be called.
Power Off
Execute the flow when the radio is explicitly powered off.
See action Script for a description.
triggertime
previous_service_state
service_state
roaming

The trigger Phone Signal Strength is executed when the signal strength falls under or raises over the specified value.
Warning: Some devices don't send the current signal strength to applications when the screen is turned off.
Examples:
- Play an alert when the signal strength becomes bad.
becomes lower than
Executes the flow when the last reported value was above the defined level and the current value is below the defined level
becomes higher than
Executes the flow when the last reported value was below the defined level and the current value is above the defined level
becomes equal to
Executes the flow when the last reported value was different than the defined level and the current value equals the defined level
lower than
Executes the flow whenever the reported value by the system is below the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same.
higher than
Executes the flow whenever the reported value by the system is above the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same.
exactly
Executes the flow whenever the reported value by the system is exactly on the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same.
See action Script for a description.
triggertime
is_gsm
signal_strength_level
signal_strength_asu
gsm_signal_strength
gsm_bit_error_rate
cdma_dbm
cdma_ecio
evdo_dbm
evdo_ecio
evdo_snr
lte_dbm

The trigger Plugin (Experimental) executes a flow when the condition of a plugin changes to true
and/or false
.
Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins.
Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions.
- becomes true: when the condition measured in the plugin changes from
false
orundefined
totrue
- becomes false: when the condition measured in the plugin changes from
true
orundefined
tofalse
See action Script for a description.
triggertime
condition
true
or false

The trigger Plugin Event (Experimental) executes a flow when an event-plugin indicates an event.
Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins.
Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions.
See action Script for a description.
triggertime

The trigger Power Source is executed when a power source is connected to the device (charger or USB cable).
Examples:
- Turn on WiFi when a power source is connected.
- Increase the screen brightness when a power source is connected.
- Set screen brightness to automatic when a power source is disconnected.
When selected executes the flow when a power source is connected.
- AC Adapter: when charging with the AC adapter
- USB: when charging over an USB connection
- Wireless: when charging wirelessly
Disconnected
When selected executes the flow when a power source is disconnected.
See action Script for a description.
triggertime
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
battery_charge_counter
(Android 5+)battery_current_now
(Android 5+)battery_current_average
(Android 5+)battery_energy_counter
(Android 5+)
The trigger Power Source (Android Wear) is executed when a power source is connected to the device (charger or USB cable).
Examples:
- Turn on WiFi when a power source is connected.
- Increase the screen brightness when a power source is connected.
- Set screen brightness to automatic when a power source is disconnected.
When selected executes the flow when a power source is connected.
- AC Adapter: when charging with the AC adapter
- USB: when charging over an USB connection
- Wireless: when charging wirelessly
Disconnected
When selected executes the flow when a power source is disconnected.
See action Script for a description.
triggertime
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
node_id

The trigger Pressure Sensor is executed when the measured pressure of the pressure sensor rises above or declines below a certain level or when the pressure changes at least the specified amount in the given time.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Tip: If you need to check the pressure only every few minutes, it is recommended to use a condition Pressure Sensor since the condition will not use the sensor constantly and thus consumes less battery.
Examples:
- Execute a flow when the pressure changes when walking down a stair.
- Declines below: executes the trigger when the measured pressure falls under a certain value
- Rises above: executes the trigger when the measured pressure rises above a certain value
- Declines within duration: executes the trigger when the measured pressure declines a certain amount within a given time
- Rises within duration: executes the trigger when the measured pressure rises a certain amount within a given time
Example:
Type: Declines below, Pressure 1000mbar, Threshold: 5mbar
The trigger is executed when the pressure declines below 1000mbar. The pressure has to rise to at least 1005mbar again before the trigger is executed again.
See action Script for a description.
triggertime
pressure

The trigger Proximity Sensor is executed when the measured distance of the proximity sensor passes the defined distance.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
See action Script for a description.
triggertime
proximity

The trigger Quick Settings Tile Selected configures the selected quick settings tile and is executed when the tile is selected/clicked.
Tip: Action Update Quick Settings Tile can be used to change the icon, label or state of the tile.
Examples:
- Create a QS tile to send an SMS with the current location.
See action Script for a description.
triggertime

The trigger Ringer Mode is executed when the device switches to the specified ringer mode.
See action Script for a description.
triggertime

The trigger Screen Orientation is executed when the orientation of the device changes to portrait or landscape.
Examples:
- Change the active keyboard type depending on screen orientation.
See action Script for a description.
triggertime

The trigger Send/Share Intent Received is executed when the send/share menu is used in an app and the data is shared with Automagic.
Examples:
- Share a URL in Google+ and directly send this link by SMS to one of your contacts.
See action Script for a description.
triggertime
data_string
mimetype
text
stream_uri
html_text
email
cc
bcc
subject

The trigger Send/Share Multiple Intent Received is executed when the send/share menu is used in an app and multiple items are shared with Automagic.
Examples:
- Select multiple files in a file manager and share the files with Automagic.
See action Script for a description.
triggertime
data_string
mimetype
texts
stream_uris
html_texts
email
cc
bcc
subject

The trigger Shake is executed when the device is shaken.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples:
- Raise the screen brightness for 1 minute when the device is shaken.
- Turn silent mode on when the device is shaken.
See action Script for a description.
triggertime

The trigger Shortcut is executed when a shortcut on the launcher is pressed.
You can create the shortcut and select an icon by pressing the Install Shortcut button.
Note: Starting with Android 8 the install shortcut button might not have any effect. In this case you can create the shortcut by saving the trigger then going to the launcher, long press a free area, select Widgets then AM Shortcut to create a new shortcut.
Examples:
- Turn WiFi on by pressing the shortcut.
- Launch a settings application screen by pressing the shortcut.
- Start recording in Gleeo Time Tracker by pressing the shortcut.
See action Script for a description.
triggertime

The trigger Shortcut (Android Wear) is executed when a shortcut in the list of Shortcut is selected (see Start -> Shortcut).
Examples:
- Turn WiFi on by pressing the shortcut.
- Launch a settings application screen by pressing the shortcut.
- Start recording in Gleeo Time Tracker by pressing the shortcut.
See action Script for a description.
triggertime
node_id

The trigger Shutdown is executed before the device shutdown.
A flow is executed on a best effort basis, Automagic might not have enough time to execute the flow completely or some services or interfaces might already be unavailable when the shutdown is detected.
Examples:
- Vibrate before the device shuts down.
See action Script for a description.
triggertime

The trigger Significant Motion Detected is executed when the special hardware sensor of the device detects a significant motion. Automagic can not configure how strong or how long the duration of the motion needs to be to activate the sensor.
Warning: This trigger hardware sensors of the device. This special hardware sensor used by this trigger should have a very low battery consumption.
See action Script for a description.
triggertime

The trigger SIM State is executed when the SIM state changes to one of the selected states.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play a warning sound when the SIM is removed.
See action Script for a description.
triggertime
previous_sim_state
sim_state

The trigger SMS Received is executed when an SMS is received depending on the criteria defined in the options.
Examples:
- Play a special alert when an SMS contains the keyword Alert!
- Send an SMS containing your location back to the SMS sender when the SMS contains Where are you?
- Read the received SMS aloud.
- Delete a password file on the SD card when the SMS contains house search!
- Play a repeating sound and vibrate when an SMS contains device lost!
Glob patterns (*, ?) can be used to filter out similar numbers like corporate number ranges:
Examples:
- +17001111111
- +17001111111,+17002222222
- *70033311*
- *70033311*,*70033?22*
+
, -
and .
are removed before comparing the number.Warning: The formatting of the incoming number depends on the operator in use.
You have to check the log file to see the exact formatting used or you can add an action Notification on Screen with text
{sms_sender}
to see the actual number.Warning: You may end up overlooking SMS you didn't intend to be matched (due to not having appeared in your messaging app).
Warning: This feature is not supported on Android 4.4+.
See action Script for a description.
triggertime
sms_text
sms_sender
contact_name
contact_company
contact_title
contact_note
contact_nickname
contact_email
contact_groups

The trigger SMS Sent is executed when an SMS is sent and stored as a sent SMS in the default SMS outbox of the standard Android SMS database.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Send every sent SMS as a mail to your mail account.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples:
- +17001111111
- +17001111111,+17002222222
- *70033311*
- *70033311*,*70033?22*
+
, -
and .
are removed before comparing the number.See action Script for a description.
triggertime
sms_text
sms_receiver
contact_name
contact_company
contact_title
contact_note
contact_nickname
contact_email
contact_groups

The trigger Sound Level (Experimental) is executed when the recorded sound level in the environment exceed a certain level.
Warning: This condition records the environment sound using the microphone of the device which does not work, when another app already uses the microphone.
See action Script for a description.
triggertime
sound_level

The trigger Speech Web Search Requested is executed when the speech recognition based search is initiated, for example by long-pressing the headset hook button.
See action Script for a description.
triggertime
language_model
free_form
, web_search
or null when not setprompt
language
web_search_only
origin

The trigger Speed is executed when the measured speed of the GPS receiver rises above or declines below a certain level.
Warning: This trigger uses the GPS receiver and might increase battery usage (depending on device model).
Examples:
- Record the location in a file whenever you are driving faster than 120km/h.
- Declines below: executes the trigger when the reported speed falls under a certain value
- Rises above: executes the trigger when the reported speed rises above a certain value
Example:
Type: Declines below, Speed 40km/h, Threshold: 10km/h
The trigger is executed when the speed declines under 40km/h. The speed has to rise to at least 50km/h again before the trigger is executed again.
See action Script for a description.
triggertime
location
location_accuracy
location_altitude
location_bearing
location_speed

The trigger Step counter uses the Step counter/Pedometer of the device and executes a flow when the specified number of steps have been counted. The device can optimise the battery usage and inform Automagic less often when the display is turned off.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices do not count the steps when the screen is off.
Examples:
- Create a calendar event 'Training highly recommended' for the next day when less than 1000 steps have been counted for the day.
See action Script for a description.
triggertime
step_count
step_count_total
last_step_time

The trigger Storage Media Event is executed when the system mounts or unmounts the SD card or makes other changes involving the storage media.
Examples:
- Disable a flow writing the location to the SD card when the sdcard is removed.
See action Script for a description.
triggertime
path

The trigger System Setting Changed is executed whenever a setting in the systems setting database was changed.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play an alert when the system turns on the blocking mode.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global Settings valid for all users of the device (Android 4.2+)
See action Script for a description.
triggertime
old_setting
setting
setting_name

The trigger System Setting Changed (Android Wear) is executed whenever a setting in the systems setting database was changed.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play an alert when the system turns on the blocking mode.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global Settings valid for all users of the device (Android 4.2+)
See action Script for a description.
triggertime
old_setting
setting
node_id

The trigger Take Note (Android Wear) is executed when a note is taken from the Wear device.
Examples:
- Take a note and directly send the note by email to your inbox.
See action Script for a description.
triggertime
note
node_id

The trigger Theater Mode (Android Wear) is executed when the theater mode is turned on or off.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Disable some flows when the theater mode is turned on.
See action Script for a description.
triggertime
node_id

The trigger Time executes the flow regularly on the specified weekday and time.
Examples:
- Download a PDF newspaper every morning at 6am.
- Turn on airplane mode every evening at 11pm.
- Turn off airplane mode every morning at 6am.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime

The trigger Time Adjusted is executed when the time of the system is changed.
See action Script for a description.
triggertime

The trigger Timezone Adjusted is executed when the timezone of the system has been changed.
See action Script for a description.
triggertime
timezone

The trigger UI Event executes a flow when the system detects a change in the user interface, for example when a window is opened, a button is pressed, a list is scrolled, text has been entered etc.
Note: The system informs Automagic not about all events. Some events that occur very frequently can be skipped by the system.
Examples:
- Execute a flow, when the Install button in Google Play is pressed.
- Window opened: A new window, dialog or popup has been opened. The variable
text
often contains the title of the window. - Component clicked: A button or label has been clicked. The variable
text
of image buttons is often empty. - Component long clicked: A button or label has been long clicked. The variable
text
of image buttons is often empty. - Component selected: An element has been selected, e.g. a row in a list or an element in a dropdown.
- Component focused: The input focus has been moved to another element.
- Component scrolled: A list has been scrolled.
- Text changed: The text in a text input fields has been changed.
- Text selection changed: The text selection or cursor position has been changed.
- Announcement: An app made an announcement like changing the page in a book.
See action Script for a description.
triggertime
event_type
- Window opened:
32
- View clicked:
1
- View long clicked:
2
- View selected:
4
- View focused:
8
- Text changed:
16
- Text selection changed:
8192
- View scrolled:
4096
- Announcement:
16384
content_description
package_name
source_class_name
source_bounds
text
label
enabled
checked
fullscreen
password
scrollable
scroll_x
scroll_y
from_index
to_index
item_count
current_item_index
added_count
removed_count
before_text
app_name

The trigger User Activity (Experimental) asks the device to periodically check most probably physical activity of the user like driving a car, riding a bike or walking.
Note: The detection of the current activity is a feature of the device provided by Google. Automagic can not change or improve the quality of the detected activity.
Examples:
- Check the activity every 5 minutes to measure how much time the user walks per day and how much time the user sits in the office.
- Increase the ringer volume when the user is driving in a car.
- Activity detected: execute the flow when the defined activity begins or ends.
- Periodically: execute the flow periodically even when the activity stays the same.
The device can detect the activity more frequently when another app is interested in activity updates and uses a shorter update interval. Some devices turn off activity detection when activity
still
is detected and a low power sensor to detect device movement is available.
This option ensures that Android invokes the trigger exactly at the specified time and prevents the system from delaying the event.
See action Script for a description.
triggertime
activity_name
activity_type
activity_confidence
activity_time
detected_activities

The trigger User Present executes the flow when the user activates the device and passed the unlock screen.
- Start the browser when the device is unlocked at home.
See action Script for a description.
triggertime

The trigger View Web URL Intent Received is executed when an app wants to show a URL in a browser.
Examples:
- Receive a URL request and read the text on a weather site aloud, forwarding all other URL to the browser to be displayed as usual.
See action Script for a description.
triggertime
data_string
categories
scheme
type

The trigger Voice Command Requested is executed when the voice recognition by a bluetooth headset (or some other means) is requested.
See action Script for a description.
triggertime

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:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
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.
Examples:
- Hold the volume down key pressed to skip to the next song.
See action Script for a description.
triggertime
key_code
key_code_name
key_duration
key_source_device_id
key_action_down
key_action_up

The trigger WiFi Connected is executed when a connection with the defined network has been established.
Examples:
- Download a file as soon as WiFi is available.
*
and ?
. Variables are supported.See action Script for a description.
triggertime
bssid
ssid

The trigger WiFi Disconnected is executed when a connection with the defined network has been separated.
Examples:
- Play an alert when WiFi is not available anymore.
- Turn off flows causing big data transfers.
*
and ?
. Variables are supported.See action Script for a description.
triggertime
bssid
ssid

The trigger WiFi Scan Results Available is executed when the results of a WiFi access point scan are available.
Examples:
- Connect to a free WiFi network when it becomes available.
See action Script for a description.
triggertime
access_points

The trigger WiFi State is executed when the devices wireless network adapter changes to one of the defined states.
Examples:
- Enable some download flows when WiFi is turned on.
See action Script for a description.
triggertime
previous_wifi_state
wifi_state

The trigger WiFi Tethering State is executed when the devices wireless network tethering setting changes to one of the defined states.
Examples:
- Play a notification sound when tethering is enabled.
See action Script for a description.
triggertime
previous_tethering_wifi_state
wifi_tethering_state

The trigger Wired Headset Plugged is executed when a wired headset or earphones have been connected or disconnected.
Examples:
- Turn down the volume when the headset is connected.
Execute the flow when the headset has been plugged.
Unplugged
Execute the flow when the headset has been unplugged.
See action Script for a description.
triggertime
headset_type
microphone
Conditions

The condition Action Sound Playing checks if an action Sound is currently playing a sound.
Examples:
- Refresh a stop-button in a widget depending whether a sound is currently playing or not.
See action Script for a description.
sound_position
sound_duration

The condition Active Cyanogen/LineageOS Profile checks whether one of the listed profiles is active.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play a sound only when the active profile is not Cinema.
See action Script for a description.
profile_name

The condition Active Network Type checks if a network (usually WiFi or Mobile) is active and usable for data traffic.
Examples:
- Execute a download action only when the current active network is WiFi.
See action Script for a description.
network_type
network_type_name
WIFI
or MOBILE
network_subtype
network_subtype_name
network_state
network_detailed_state
network_extra_info
network_reason

The condition Airplane Mode On checks whether the airplane mode is on or not.
Examples:
- Only download a file when airplane mode is turned off.

The condition Android Wear Device Connected checks whether a particular Android Wear device is currently connected to the main device.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play a notification shound only when not connected to the Android Wear device.
See action Script for a description.
node_id
node_name

The condition App Process Running checks whether the process hosting an app is currently running.
Note: Android keeps processes in memory even when the process might not be required anymore and enough free memory is available.
Note: The official API used to access this information has been removed by Google on Android 5.1.1 which means that the condition is now marked as not officially supported.
Note: The unofficial workarounds to access this information don't work anymore on most devices running Android 7.
See action Script for a description.
pid
importance
(Android <5.1.1)lru
(Android <5.1.1)process_state
(not available on all versions of Android, Android <5.1.1)uid

The condition App Task Running checks whether a task for one of the specified packages is currently running.
Warning: This function is not officially supported by Android 5+ and might not work on all devices.
Warning: This option must be activated on Android 5+.
See action Script for a description.
package_name
index
(not available on Android 5+)base_activity
(not available on Android 5+)top_activity
(not available on Android 5+)id
(not available on Android 5+)num_running
(not available on Android 5+)description
(not available on Android 5+)
The condition Audio Manager Mode checks whether the device is currently configured to use the desired audio manager mode.

The condition Audio Stream Active checks if the defined audio stream is currently in active use.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- check if a ringtone is currently played.

The condition Audio Volume checks whether the volume of the selected stream type is above or below a certain level.
Examples:
- Execute a vibrate action only when the music volume is very low.

The condition Auto Sync Enabled checks whether the automatic synchronisation is turned on or off either globally (the master switch) or for a specific account/authority.
Examples:
- Check the current state of auto sync to toggle the setting to the opposite value.

The condition Auto-rotate Screen Enabled checks whether the system setting to automatically rotate the screen is enabled or not.

The condition Battery Level checks whether the battery level is above or below a certain level.
Examples:
- Download a file only when the battery level is above 50%.
lower than
true when the reported percentage by the system is below the defined level
higher than
true when the reported percentage by the system is above the defined level
exactly
true when the reported percentage by the system is exactly on the defined level
full
true when the reported battery status by the system is full
See action Script for a description.
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
battery_charge_counter
(Android 5+)battery_current_now
(Android 5+)battery_current_average
(Android 5+)battery_energy_counter
(Android 5+)
The condition Battery Level (Android Wear) checks whether the battery level is above or below a certain level.
Examples:
- Download a file only when the battery level is above 50%.
lower than
true when the reported percentage by the system is below the defined level
higher than
true when the reported percentage by the system is above the defined level
exactly
true when the reported percentage by the system is exactly on the defined level
full
true when the reported battery status by the system is full
See action Script for a description.
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
node_id

The condition Battery Level BLE (Experimental) checks the battery level of a Bluetooth LE device that supports the standardized Battery service.
Warning: Bluetooth LE is not working reliable on many Android ROMs. Restarting the device or turning Bluetooth off and on again can help when the condition does not work.
Examples:
- Check once a week if the battery of the Polar heart rate sensor is still OK.
lower than
true when the reported percentage by the device is below the defined level
higher than
true when the reported percentage by the device is above the defined level
exactly
true when the reported percentage by the device is exactly on the defined level
See action Script for a description.
battery_level
battery_percentage

The condition Battery Saver Mode Enabled checks whether the battery saver mode is active or not (Android 5+).
Warning: This function does not work for manufacturer specific battery saving modes like Samsungs (Ultra-)energy saving mode or Sony and HTC specific modes. Please use action Init Variable System Setting on such devices.
Examples:
- Execute a battery hungry flow only when the battery saver mode is not active.

The condition Biometric Authentication Dialog shows the authentication dialog of the system and validates a biometric attribute like a fingerprint.
The dialog is temporarily not shown by the system when the fingerprint scanning failed a few times.
Examples:
- Show an authentication dialog for security reasons before deleting a file.
See action Script for a description.
operation
Can be one of:
success
when the user successfully authenticatedfailure
when the user failed to authenticatetimeout
when the dialog was closed by a timeoutcancel
when the user pressed the back button or back key
error_code
error_message

The condition Bluetooth Device Connected checks whether a connection to a Bluetooth device exists.
Warning: This function is not directly supported by Android. The list of currently connected Bluetooth devices is collected using connect/disconnect events reported to Automagic.
Under certain circumstances, the list of connected devices might not correspond to the list of really connected devices, for example when Automagic is freshly installed and a bluetooth device was already connected. In such cases, the bluetooth adapter must be disabled temporarily and reenabled in the preferences of Android to force the Bluetooth devices to reconnect.
Examples:
- Turn on WiFi in the evening only when one of the Bluetooth devices at home is connected.
See action Script for a description.
connected_devices_addresses
connected_devices_names

The condition Bluetooth Enabled checks whether bluetooth is turned on or off.
Examples:
- Open an app when bluetooth is turned on.

The condition Bluetooth LE Device Available executes a BT LE scan to test if a device is currently available.
Examples:
- Scan every 10 minutes if a BT LE beacon is available to turn WiFi on at home.
See action Script for a description.
rssi

The condition Bluetooth SCO On checks whether communications use Bluetooth SCO or not.

The condition Calendar Event checks, whether an event on the calendar is currently active.
Examples:
- Send an SMS to the calling number telling when your meeting ends.
- Don't let the SMS be read aloud in a meeting.
*
and ?
. Variables are supported.*
and ?
. Variables are supported.Examples:
Plan*
matches titles likePlanning
,Plan B
etc.
*
and ?
. Variables are supported.*
and ?
. Variables are supported.See action Script for a description.
event_calendar
event_title
event_description
event_location
event_start
event_end
event_all_day
event_availability
event_id

The condition Call State checks whether a call is currently active or not.
Note: State Ringing is only valid for incoming calls, an outgoing call directly changes the state from Idle to Off-hook

The condition Confirmation Dialog shows a dialog with a question and continues flow execution depending on the button pressed.
Examples:
- Turn on bluetooth but ask for confirmation first.
See action Script for a description.
operation
Can be one of:
yes
when the user pressed the Yes-buttonno
when the user pressed the No-buttontimeout
when the dialog was closed by a timeoutcancel
when the user pressed the back key and the appropriate option is set

The condition Custom Widget Overlay Showing checks if a particular custom widget is currently showing as an overlay.
Note: Android sometimes temporarily hides overlays for security reasons. This condition can not detect this circumstance and might assume that the widget is showing.
Examples:
- Execute some actions of a flow only when a particular overlay is showing.

The condition Debug Dialog shows a dialog containing all variables and the corresponding values in a dialog. Buttons can be used to control if the condition continues at true or false.
Examples:
- Debug a complex flow.

The condition Device Idle/Doze Mode Active checks if the device is currently in idle/doze mode.
Examples:
- Only make network access from a flow when the device is not in idle/doze mode to save battery.

The condition Device Orientation checks whether the device is in one of the specified orientation.
Examples:
- Beep every 5 minutes when recording your time but only when the device display is not facing down.
- Face down: The display of the device is facing down for example when lying on a table with the display towards the table.
- Face up: The display of the device is facing up for example when lying on a table with the display facing away from the table.
- Face left: The display faces to the left with the longer side lying on a table when the upper edge of the device is pointing away from you.
- Face right: The display faces to the right with the longer side lying on a table when the upper edge of the device is pointing away from you.
- Standing upright: The device is standing upright on a table.
- Standing upside-down: The device is standing upside-down on a table.
See action Script for a description.
accel_x
accel_y
accel_z

The condition Device Storage Space checks the storage space on the filesystem containing the specified path.
- Check every morning if 100MB are still free on the SD card.
See action Script for a description.
available_blocks
free_blocks
block_count
block_size
available_space
used_space

The condition Device Storage Space Low checks whether the free space of the internal memory of the device is low.
Note: The amount of free space to consider as low is defined by the device manufacturer.
Standard Android considers less than 10% of free internal memory as low.
- Play a warning sound every 5 minutes when the device storage space is low.

The condition Dock State checks whether the device is in one of the docking states or not.
- Docked Car: in a car dock
- Docked Desk: in a desk dock
- Docked Desk (High End, Digital): in a high end, digital dock
- Docked Desk (Low End, Analog Dock): in a low end, analog dock
- Docked Special: in a special dock like a hardware keyboard for an ASUS Transformer
- Undocked: not in a dock

The condition Execution Count checks whether the condition has been executed a certain amount of times. An internal counter is incremented whenever the condition is executed. The counter is reset to zero when the condition is met.
Examples:
- Play an alarm when 2 SMS are received within 5 minutes.
- Turn off the screen when the device is shook 2 times in 10 seconds.

The condition Expression checks whether the expression is true or not.
Example Expressions:a==1
b > =3
c < b AND a > 3
(a--)==0
startsWith(a, "test")
a > addDays(b, 4)
isEmpty(files)
Examples:
- Check if the accuracy of a location is good enough:
location_accuracy<300
- Check if a counter reached zero:
counter==0
Note: Variables can be used directly in an expression and don't need to be escaped using curly braces.
Example: use
location_accuracy
instead of {location_accuracy}
.

The condition Flashlight On checks if the flashlight has been turned on by Automagic.
Warning: This condition can only check if the flashlight was turned on by Automagic but not if the flashlight has been turned on by another app.

The condition Flow Enabled checks whether a flow is enabled or disabled.

The condition Flow Executing checks if a particular flow is currently executing.
Examples:
- Don't execute a flow when the flow is already executed.
See action Script for a description.
flow_execution_contexts

The condition Gleeo is Recording checks whether Gleeo Time Tracker is currently recording a specific project or task.

The condition Gmail Unread Conversation Count checks the number of unread conversations available in the Gmail app on the device.
Examples:
- Play an alert sound every 5 minutes when unread conversations are available.
lower than
true when the reported count is below the defined count
higher than
true when the reported count is above the defined count
exactly
true when the reported count is exactly matches the defined count
*
and ?
. Variables are supported.See action Script for a description.
count

The condition Hardware Keyboard State checks whether the hardware keyboard of the device is currently open or closed.
Examples:
- Play an alert sound only when the keyboard is closed.
See action Script for a description.
keyboard_type

The condition Hardware Keyboard Type checks if the currently connected hardware keyboard type matches one of the selected types.
See action Script for a description.
keyboard_type

The condition Host Reachable tests whether a host can be reached by either opening a TCP-connection using a socket or by executing a ping command.
Examples:
- Check once an hour if a server can be reached or not.
- Automatic: Tries to connect to the host to port 7 to determine if the host is available. This method might use ping on some versions of Android.
- Socket: Tries to establish a TCP-connection to the specified host and port. The host is only considered to be reachable when the connection can be successfully established.
- Ping: Checks the reachability of the host using a
ping
-command (only one echo-request is sent). This option only works when theping
-command is available on the device.

The condition Interruptions Mode checks if the device is in the specified interruption mode.
Examples:
- Only speak out an SMS when all interruptions are allowed.

The condition Keyguard Locked checks whether or not the keyguard is currently active/showing.

The condition Keyguard with Security checks whether a keyguard/lockscreen with a security element (PIN, password, ...) or not (None, Swipe) is set.

The condition Light Sensor checks whether the measured value of the light sensor is below or above the defined level.
Warning: Some devices turn off the sensors when the screen is off.
Warning: Some devices can not determine the current value of the sensor and only deliver a value when the measured value of the sensor changes. This condition does not work on such devices.
See action Script for a description.
light_level

The condition Location checks whether a location is inside a specific area or not. The condition can also check if an area is entered or exited by comparing the location of the last execution and the current location.
The condition uses the location already made available to the flow from a location trigger or uses the last known location of the system.
The condition fails when no location is available in the flow and the device does not have a last known location ready. This usually happens when the flow is executed manually. Either use one of the location triggers to execute your flow or explicitly acquire the location using an action Init Variable Location before the condition is reached.
Examples:
- Enable WiFi when you enter your office.
- Stop recording in Gleeo Time Tracker when you leave your office.
See action Script for a description.
location
location_name
entering
exiting
inside

The condition Location Entering checks whether an area has been entered or exited. This condition should only be used in conjunction with a Location trigger.
Examples:
- Enable WiFi when entering a location, disable WiFi when exiting the location.
- Start recording in Gleeo Time Tracker when coming to the office, stop recording when exiting the office.

The condition Location Provider Enabled checks whether a particular location provider like GPS is enabled or not.
Examples:
- Report your location per SMS only when GPS is active.
Network
This provider uses the location provided by the cell tower and Wi-Fi signals. Depending on environment this provider can deliver location of about 60 meters of accuracy. Locations found using the cell tower can be very inaccurate (up to several kilometers or miles).
Passive
This provider delivers the location from the currently active provider (Network or GPS) without activating one of the providers by itself. This might result in very infrequent location updates.
GPS
This provider delivers the location using the GPS receiver. This provider usually uses more battery than the network provider.

The condition Magnetic Field Sensor checks whether the measured value of the magnetic field sensor is below or above the defined level.
Warning: Some devices turn off the sensors when the screen is off.
Warning: Some devices can not determine the current value of the sensor and only deliver a value when the measured value of the sensor changes. This condition does not work on such devices.
Examples:
- Execute some actions only when the device is placed near a magnet.
See action Script for a description.
magnetic_field_strength

The condition Microphone Mute checks whether the microphone is currently muted.
Examples:
- Play a warning sound when the microphone is mute.

The condition Mobile Datanetwork Enabled checks whether the mobile datanetwork is turned on or off.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Open an app when the mobile datanetwork is turned on.

The condition Mobile Datanetwork Type checks if the current datanetwork type matches one selected in the list.
Examples:
- Download a PDF only when the network type is UMTS or LTE.
See action Script for a description.
mobile_network_type

The condition Music Active checks whether the music audio stream is currently in use.
Examples:
- Turn down the media volume when entering a location and the music is playing.

The condition Network Connected checks if a network connection is currently available.
Examples:
- Check that a network connection is available before sending a mail.

The condition NFC Enabled checks whether NFC is turned on or off.
Examples:
- Play an alert sound when NFC is turned off when you enter the office.

The condition Night Mode checks whether the device is currently configured to use the desired night mode.

The condition Notification on Statusbar Displayed checks whether a notification of an app is displayed in the statusbar and supplies the information of the first matching notification as variables to the flow.
Examples:
- Check every 5 minutes if an Hangout message is displayed in the statusbar and play a notification sound.
A notification is considered regular when the notification is not marked as ongoing by the posting app.
A notification is marked as an ongoing event by the application that posts the notification and is usually set when a notification shows some progress like a file download, an app is playing a sound, or an app is running as a foreground service.
A group summary is an additional notification that is used to group several related notifications together.
See action Script for a description.
title
content_title
content_title_big
notification_text
(This function is not officially supported by Android and does not work with all notifications)notification_text_big
(This function is not officially supported by Android and does not work with all notifications)notification_channel_id
(Android 8.0+)notification_priority
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_large_icon
(This function is not officially supported by Android and does not work with all notifications)notification_when
notification_number
notification_vibrate_default
notification_vibrate_pattern
notification_sound_default
notification_sound_uri
notification_people
(Android 4.4+)notification_info_text
(Android 4.4+)notification_sub_text
(Android 4.4+)notification_summary_text
(Android 4.4+)notification_progress
(Android 4.4+)notification_progress_max
(Android 4.4+)notification_progress_indeterminate
(Android 4.4+)notification_text_lines
(Android 4.4+)notification_background_image_uri
(Android 5+)notification_category
(Android 5+)notification_accent_color
(Android 5+)notification_ticker_text
notification_visibility
(Android 5+)notification_ongoing
notification_foreground_service
notification_local_only
notification_group
(Android 7+)notification_is_group_summary
(Android 7+)package_name
app_name
id
buttons
(This function is not officially supported by Android and does not work with all notifications)wearable_actions
(Android 4.4+, This function is not officially supported by Android and does not work with all notifications)count

The condition Phone Cell CDMA checks whether the phone is connected to one of the specified cells of interest.
Examples:
- Turn on WiFi when the phone cell at home is detected.
See action Script for a description.
triggertime
cell_id
base_station_id
network_id
system_id
base_station_latitude
base_station_longitude
neighboring_cells
cells
(Android 4.2+)
The condition Phone Cell GSM checks whether the phone is connected to one of the specified cells of interest.
Examples:
- Turn on WiFi when the phone cell at home is detected.
See action Script for a description.
lac
cid
psc
neighboring_cells
cells
(Android 4.2+)
The condition Phone Service State checks whether the phone service is currently available, unavailable or only emergency calls can be placed.
Warning: Some devices don't send the current service state to applications when the screen is turned off.
See action Script for a description.
service_state
roaming

The condition Phone Signal Strength checks whether the signal strength of the mobile network is above or below a certain level.
Warning: Some devices don't send the current signal strength to applications when the screen is turned off. You can use the options to periodically turn the screen on or wake the device.
Examples:
- Beep every five minutes when the network strength is very weak.
lower than
true when the reported signal strength by the system is below the defined level
higher than
true when the reported signal strength by the system is above the defined level
exactly
true when the reported signal strength by the system is exactly on the defined level
See action Script for a description.
is_gsm
signal_strength_level
signal_strength_asu
gsm_signal_strength
gsm_bit_error_rate
cdma_dbm
cdma_ecio
evdo_dbm
evdo_ecio
evdo_snr
lte_dbm

The condition Plugin (Experimental) checks the condition of a plugin.
Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins.
Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions.
See action Script for a description.
Tasker variables

The condition Power Source Connected checks whether the device is currently connected to a power source.
Examples:
- Turn on WiFi only when the device is connected to an AC adapter.
When a power source is connected.
- AC Adapter: when charging with the AC adapter
- USB: when charging over an USB connection
- Wireless: when charging wirelessly
Disconnected
When no power source is connected.
See action Script for a description.
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
battery_charge_counter
(Android 5+)battery_current_now
(Android 5+)battery_current_average
(Android 5+)battery_energy_counter
(Android 5+)
The condition Power Source Connected (Android Wear) checks whether the device is currently connected to a power source.
Examples:
- Turn on WiFi only when the device is connected to an AC adapter.
When a power source is connected.
- AC Adapter: when charging with the AC adapter
- USB: when charging over an USB connection
- Wireless: when charging wirelessly
Disconnected
When no power source is connected.
See action Script for a description.
battery_level
battery_percentage
battery_plugged
battery_present
battery_scale
battery_status
battery_technology
battery_temperature
battery_voltage
battery_health
node_id

The condition Pressure Sensor checks whether the measured pressure is below or above the defined value.
Warning: Some devices turn off the sensors when the screen is off.
Warning: Some devices can not determine the current value of the sensor and only deliver a value when the measured value of the sensor changes. This condition does not work on such devices.
See action Script for a description.
pressure

The condition Proximity Sensor checks whether the measured distance of the proximity sensor is below or above the defined distance.
Warning: Some devices turn off the sensors when the screen is off.
Warning: Some devices can not determine the current value of the sensor and only deliver a value when the measured value of the sensor changes. This condition does not work on such devices.
See action Script for a description.
proximity

The condition Ringer Mode checks whether the device is currently configured to use the desired ringer mode.

The condition Roaming checks whether you are currently in a roaming location.
Examples:
- Only download a file when you are not using a more expensive roaming tariff.

The condition Root Setting Enabled checks whether the Root setting in Automagic is enabled or not.
Examples:
- Execute an action only when root actions are allowed to be executed.

The condition Screen Automatic Brightness Enabled checks whether the setting to change the display brightness automatically depending on the environment is turned on or not.

The condition Screen On checks whether the screen is currently turned on.
Examples:
- Show an alert only when the display is on.

The condition Screen Orientation tests whether the device is currently in portrait or landscape mode.

The condition Service Running checks whether the specified service is currently running.
See action Script for a description.
package_name
service_name
pid
uid
active_since
last_activity_time
restarting
foreground

The condition Sound Level (Experimental) checks whether or not the environment sound exceed a certain level.
Warning: This condition records the environment sound using the microphone of the device which does not work, when another app already uses the microphone.
See action Script for a description.
sound_level

The condition Speakerphone On checks whether speakerphone is turned on or off.

The condition Telephony Radio Enabled checks if the radio of the phone is enabled or not.
Warning: This function is not officially supported by Android and might not work on all devices.

The condition Theater Mode On (Android Wear) checks whether the theater mode is turned on or not.
Warning: This function is not officially supported by Android and might not work on all devices.

The condition Time Range is true when the current time is in the defined time range.
Examples:
- Play an alert only during the day.

The condition UI Mode checks whether the device is currently in car, desk, TV or normal UI mode.
Note: Many devices only support the normal UI mode.

The condition USB Tethering Enabled checks whether USB tethering is enabled or not.
Warning: This function is not officially supported by Android and might not work on all devices.

The condition Vibrate on Ring Enabled checks whether the setting to vibrate on ring is enabled or not.
Warning: This function is not officially supported by Android and might not work on all devices.

The condition WiFi Access Point Enabled checks whether a WiFi configuration is enabled and the system is allowed to connect to this access point.

The condition WiFi Available checks whether one specific WiFi access point is currently available. The condition waits for the first available scan result when wifi has just been enabled and no scan result is available yet.
Note: Starting with Android 6, scan results are only provided to apps when the location services of the system are enabled.
Examples:
- Check if a specific free access point is available and enable this one.
The variables supplied by the condition relate to the available access point with the highest signal strength.
See action Script for a description.
access_points
bssid
(only set when the SSID is available)bssids
(only set when the SSID is available)ssid
(only set when the SSID is available)capabilities
(only set when the SSID is available)frequency
(only set when the SSID is available)level
(only set when the SSID is available)
The condition WiFi Connected checks whether the device is currently connected to one of the specified WiFi networks.
Examples:
- Start recording in Gleeo Time Tracker when you are in the office and connected to the wireless network.
- Enable a flow downloading big PDF files only when connected to your free wireless network at home.
See action Script for a description.
bssid
ssid

The condition WiFi Signal Level checks the signal level of the connected wifi network.
Note: The current signal strength has to be measured using a wifi scan when the display is turned off. A wifi scan can take a few seconds and increases battery consumption.
lower than
true when the reported level by the system is below the defined level
higher than
true when the reported level by the system is above the defined level
exactly
true when the reported level by the system is exactly on the defined level
See action Script for a description.
rssi
signal_strength_level

The condition WiFi State checks whether the device wireless network adapter is in the specified state.
See action Script for a description.
wifi_state

The condition WiFi Tethering State checks whether the device wireless network adapter is in the specified state.
See action Script for a description.
wifi_tethering_state

The condition Wired Headset Plugged checks whether a wired headset is currently plugged in or not.
Examples:
- Turn the volume to maximum only when the headset is not plugged.
Actions

The action Add WiFi Access Point adds a new WiFi configuration and optionally connects to the new WiFi network.
Examples:
- Scan a barcode with WiFi connection information and directly connect to the new WiFi.

The action Answer Ringing Call answers the currently-ringing call.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Automatically answer a call when you are prepared to answer calls but don't have your hands free.

The action Call Number calls a number by opening the telephone application and directly calling the supplied number.
Example:
- Automatically call a contact at 6pm.

The action Clear Automagic Log clears the internal log of Automagic (not the log on the SD-card when enabled in the preferences).

The action Close System Dialogs closes system dialogs like the expanded notification area, the expanded quick settings or the power-menu.
Whether dialog is classified as a system dialog or not is controlled by the dialog itself. Regular dialogs and windows can not be closed using this action.

The action Combine Images allows to superimpose two images on top of each other. The images have to be loaded with action Init Variable Image File.
Note: The action has to create a copy of the image in memory so please ensure to scale down the images first when memory becomes an issue.
Examples:
- Superimpose a logo on an image as a watermark.

The action Compare Images compares two images pixel by pixel and provides an output image that shows the differences in the selected color and provides variables containing the total number of equal and different pixels.
Examples:
- Compare two screenshots to check if the screen contents differ.
Examples:
- 0=no tolerance, pixels have to be absolutely equal
- 0.1=a bit of tolerance, pixels can be a slightly different and still be considered equal
See action Script for a description.
image_data
equal_pixel_count
different_pixel_count

The action Connect/Disconnect Bluetooth Device tries to connect/disconnect to/from a paired bluetooth device (Android 3+ required).
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Connect to the bluetooth headset when a shortcut is pressed.

The action Control Audio Player can launch and control the default audio player of Android. Note that device and manufacturer specific audio players will probably not work.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Pause the audio player when the headphones are disconnected.
- Media Button: Simulates the press of a media button
- Broadcast: Sends a broadcast to the audio service
- Play: Starts to play (Android >3)
- Play/Pause: Toggles between play and pause
- Pause: Pauses the audio player (Android >3)
- Stop: Stops the audio player
- Previous: Plays the previous track
- Next: Plays the next track
- Fast forward: Fast forward
- Rewind: Rewind
- Eject: Ejects the media (for example a CD tray) (Android >3)
- Close: Closes the media tray (for example a CD tray) (Android >3)
- Record: Starts to record (Android >3)
- Track: Switches the audio track (Android >4.4)
- Launch: Launches the audio player
- Play: Starts to play
- Play/Pause: Toggles between play and pause
- Pause: Pauses the audio player
- Stop: Stops the audio player
- Previous: Plays the previous track
- Next: Plays the next track
- Cycle Repeat: Activates the next cycle mode
- Toggle Shuffle: Toggles the shuffle mode on/off

The action Control UI uses the accessibility features of the device to control the user interface and allows to automatically press buttons, long-click elements, scroll lists and change the values of checkboxes and radio buttons.
Note: This action controls the user interface by simulating user input, therefore the screen has to be active, unlocked and the user interface must be showing on screen.
The accessibility service of Automagic needs to be enabled in the preferences for this action to work. At least Android 4.1 (Jelly Bean) is required.
Note: Turning on the accessibility service is not possible on some devices when a screen brightness or screen filter app displays an overlay over other controls. Please disable such apps temporarily when pressing the OK button in system settings is not possible.
Examples:
- Start the location settings page and enable/disable GPS.
- Start the device update check by pressing the "Check now" button.
See action Script for a description of the basic features of the scripting language.
Warning: The following example scripts are highly device specific! Please only use the scripts for reference and don't just copy/paste the scripts. It might click the wrong control elements on your device.
Clear all notifications:
notifications();//to expand the notifications sleep(1000);//wait one second for animations to complete clicked = click("Clear all notifications");//click the button if(not clicked) //check whether the button has been successfully clicked { back();//hide the notification when the clear button was not available }Toggle GPS on/off:
Use an action Launch App: Settings/Location services to directly start the GPS settings page
sleep(1000);//wait for settings page to show click("GPS satellites");//toggle setting on/off sleep(500); back();//go back to the previous screenOpen the Apps drawer:
home();//ensure the main home screen is showing sleep(1000);//wait one second for animations to complete click("Apps");//open the apps drawer
Boolean sleep(Number milliseconds)
Waits for the specified amount ofmilliseconds
.Boolean sleep(String duration)
Waits for the specified amount ofmilliseconds
.Boolean back()
Presses the back key.Boolean home()
Presses the home key.Boolean notifications()
Expands the statusbar.Boolean quickSettings()
Opens the quick settings of the status bar.Boolean recents()
Opens the recent application list.Boolean powerDialog()
Opens the power long-press dialog. (Android 5+)Boolean toggleSplitScreen()
Toggles the split screen mode. (Android 7+)Boolean lockScreen()
Locks the screen (Android 9+)Boolean takeScreenshot()
Takes a screenshot (Android 9+)Boolean click(String pattern)
Clicks on the element containing the given globpattern
.Boolean click(Number x, Number y)
Clicks on the element at the specified location.Boolean clickById(String id)
Clicks on the element with the givenid
. (Android 4.3+)Boolean clickByIdAndIndex(String id, Number index)
Clicks on the n-th element with the givenid
. (Android 4.3+)Boolean touchGesture(Number startMillis, Number endMillis, List coordinates, ...)
Simulates touch screen input by replaying the given coordinates within the specified amount of time. (Android 7+)Boolean longclick(String pattern)
Longclicks on the element containing the given globpattern
.Boolean longclick(Number x, Number y)
Longclicks on the element at the specified location.Boolean longclickById(String id, Number index)
Longclicks on the element with the givenid
. (Android 4.3+)Boolean longclickByIdAndIndex(String id, Number index)
Longclicks on the n-th element with the givenid
. (Android 4.3+)Boolean check(String pattern)
Checks the element containing the given globpattern
.Boolean check(Number x, Number y)
Checks the element at the specified location.Boolean checkById(String id, Number index)
Checks the element with the givenid
. (Android 4.3+)Boolean checkByIdAndIndex(String id, Number index)
Checks the n-th element with the givenid
. (Android 4.3+)Boolean isChecked(String pattern)
Tests whether the element containing the given globpattern
is checked.Boolean isChecked(Number x, Number y)
Tests whether the element at the specified location is checked.Boolean isCheckedById(String id)
Tests whether the element with the givenid
is checked. (Android 4.3+)Boolean isCheckedByIdAndIndex(String id, Number index)
Tests whether the n-th element with the givenid
is checked. (Android 4.3+)Boolean uncheck(String pattern)
Unchecks the element containing the given globpattern
.Boolean uncheck(Number x, Number y)
Unchecks the element at the specified location.Boolean uncheckById(String id)
Unchecks the element with the givenid
. (Android 4.3+)Boolean uncheckByIdAndIndex(String id, Number index)
Unchecks the n-th element with the givenid
. (Android 4.3+)Boolean scrollForward(String pattern)
Scrolls the element containing the given globpattern
.Boolean scrollForward(Number x, Number y)
Scrolls the element at the specified location.Boolean scrollForwardById(String id)
Scrolls the element with the givenid
. (Android 4.3+)Boolean scrollForwardByIdAndIndex(String id, Number index)
Scrolls the n-th element with the givenid
. (Android 4.3+)Boolean scrollBackward(String pattern)
Scrolls the element containing the given globpattern
.Boolean scrollBackward(Number x, Number y)
Scrolls the element at the specified location.Boolean scrollBackwardById(String id)
Scrolls the element with the givenid
. (Android 4.3+)Boolean scrollBackwardByIdAndIndex(String id, Number index)
Scrolls the n-th element with the givenid
. (Android 4.3+)Boolean select(String pattern)
Selects the element containing the given globpattern
.Boolean select(Number x, Number y)
Selects the element at the specified location.Boolean selectById(String id)
Selects the element with the givenid
. (Android 4.3+)Boolean selectByIdAndIndex(String id, Number index)
Selects the n-th element with the givenid
. (Android 4.3+)Boolean clearSelection(String pattern)
Unselects the element containing the given globpattern
.Boolean clearSelection(Number x, Number y)
Unselects the element at the specified location.Boolean clearSelectionById(String id)
Unselects the element with the givenid
. (Android 4.3+)Boolean clearSelectionByIdAndIndex(String id, Number index)
Unselects the n-th element with the givenid
. (Android 4.3+)Boolean focus(String pattern)
Focuses the element containing the given globpattern
.Boolean focus(Number x, Number y)
Focuses the element at the specified location.Boolean focusById(String id)
Focuses the element with the givenid
. (Android 4.3+)Boolean focusByIdAndIndex(String id, Number index)
Focuses the n-th element with the givenid
. (Android 4.3+)Boolean expand(String pattern)
Expands the element containing the given globpattern
. (Android 4.4+)Boolean expand(Number x, Number y)
Expands the element at the specified location. (Android 4.4+)Boolean expandById(String id)
Expands the element with the givenid
. (Android 4.4+)Boolean expandByIdAndIndex(String id, Number index)
Expands the n-th element with the givenid
. (Android 4.4+)Boolean collapse(String pattern)
Collapses the element containing the given globpattern
. (Android 4.4+)Boolean collapse(Number x, Number y)
Collapses the element at the specified location. (Android 4.4+)Boolean cut()
Cuts the text of the focused element. (Android 4.3+)Boolean cut(String pattern)
Cuts the text of the element containing the given globpattern
. (Android 4.3+)Boolean cut(Number x, Number y)
Cuts the text of the element at the specified location. (Android 4.3+)Boolean cutById(String id)
Cuts the text of the element with the givenid
. (Android 4.3+)Boolean cutByIdAndIndex(String id, Number index)
Cuts the text of the n-th element with the givenid
. (Android 4.3+)Boolean copy()
Copies the text of the focused element. (Android 4.3+)Boolean copy(String pattern)
Copies the text of the element containing the given globpattern
. (Android 4.3+)Boolean copy(Number x, Number y)
Copies the text of the element at the specified location. (Android 4.3+)Boolean copyById(String id)
Copies the text of the element with the givenid
. (Android 4.3+)Boolean copyByIdAndIndex(String id, Number index)
Copies the text of the n-th element with the givenid
. (Android 4.3+)Boolean paste()
Pastes text to the focused element. (Android 4.3+)Boolean paste(String pattern)
Pastes text to the element containing the given globpattern
. (Android 4.3+)Boolean paste(Number x, Number y)
Pastes text to the element at the specified location. (Android 4.3+)Boolean pasteById(String id)
Pastes text to the element with the givenid
. (Android 4.3+)Boolean pasteByIdAndIndex(String id, Number index)
Pastes text to the n-th element with the givenid
. (Android 4.3+)Boolean setSelection2(Number start, Number end)
Sets the selection of the focused element to the defined range. (Android 4.3+)Boolean setSelection2(String pattern, Number start, Number end)
Sets the selection of the element containing the given globpattern
. (Android 4.3+)Boolean setSelection2(Number x, Number y, Number start, Number end)
Sets the selection of the element at the specified location. (Android 4.3+)Boolean setSelection2ById(String id, Number start, Number end)
Sets the selection of the element with the givenid
. (Android 4.3+)Boolean setSelection2ByIdAndIndex(String id, Number index, Number start, Number end)
Sets the selection of the n-th element with the givenid
. (Android 4.3+)Boolean dismiss(String pattern)
Dismisses the element containing the given globpattern
. (Android 4.4+)Boolean dismiss(Number x, Number y)
Dismisses the element at the specified location. (Android 4.4+)Boolean dismissById(String id)
Dismisses the element with the givenid
. (Android 4.4+)Boolean dismissByIdAndIndex(String id, Number index)
Dismisses the n-th element with the givenid
. (Android 4.4+)String getText()
Returns the text of the focused element.String getText(String pattern)
Returns the text of the element containing the given globpattern
.String getText(Number x, Number y)
Returns the text of the element at the specified location.String getTextById(String id)
Returns the text of the element with the givenid
. (Android 4.3+)String getTextByIdAndIndex(String id, Number index)
Returns the text of the n-th element with the givenid
. (Android 4.3+)String getContentDescription()
Returns the content description of the focused element.String getContentDescription(String pattern)
Returns the content description of the element containing the given globpattern
.String getContentDescription(Number x, Number y)
Returns the content description of the element at the specified location.String getContentDescriptionById(String id)
Returns the content description of the element with the givenid
. (Android 4.3+)String getContentDescriptionByIdAndIndex(String id, Number index)
Returns the content description of the n-th element with the givenid
. (Android 4.3+)String getTextInActiveWindow()
Returns the text of all text elements. The order of the text elements can differ from the visual position.String getContentDescriptionInActiveWindow()
Returns the content description of all elements. The order of the text elements can differ from the visual position.Boolean setText2(String pattern, String text)
Sets the text of the element containing the given globpattern
. (Android 5+)Boolean setText2(Number x, Number y, String text)
Sets the text of the element at the specified location. (Android 5+)Boolean setText2ById(String id, String text)
Sets the text of the element with the givenid
. (Android 5+)Boolean setText2ByIdAndIndex(String id, Number index, String text)
Sets the text of the n-th element with the givenid
. (Android 5+)List getBounds(String pattern)
Returns the bounds of the element containing the given globpattern
in a list with the values [x, y, width, height].List getBoundsById(String id)
Returns the bounds of the element with the givenid
in a list with the values [x, y, width, height]. (Android 4.3+)List getBoundsByIdAndIndex(String id, Number index)
Returns the bounds of the n-th element with the givenid
in a list with the values [x, y, width, height]. (Android 4.3+)Boolean existsElementById(String id)
Returns true when the element with the givenid
exists on the current window. (Android 4.3+)Boolean existsElementByIdAndIndex(String id, Number index)
Returns true when the n-th element with the givenid
exists on the current window. (Android 4.3+)Number getNumberOfElementsWithId(String id)
Returns number of elements with the definedid
on the current window. (Android 4.3+)Boolean sendKey(Number keyCode)
Simulates the specified key (Automagic input method required).Boolean sendKey(String keyCodeName)
Simulates the specified key (Automagic input method required).Boolean sendKey(String keyCodeName, String metaKey, ...)
Simulates the specified key with meta key state (Automagic input method required).Boolean sendText(String text)
Sends the text to the focused component (Automagic input method required).Boolean setText(String text)
Sets the text of the focused component (Automagic input method required).Boolean setSelection(Number start, Number end)
Sets the selection of the focused component (Automagic input method required).List getSelection()
Returns the start and end position of the cursor in a list with the values [start, end] (Automagic input method required).Boolean selectAll()
Selects the text of the focused component (Automagic input method required).

The action Copy File locally copies a file.
Examples:
- Create a weekly backup of the Automagic flows to a file containing the timestamp.
Examples:
/mnt/sdcard/export_
becomes{triggertime, dateformat, yyyy_MM_dd} .csv /mnt/sdcard/
export_2011_02_13.csv

The action Copy Files locally copies one or a list of files to the specified target directory or file.
Examples:
- Backup all files in directory
/mnt/sdcard/xyz/
to the folder/mnt/sdcard/xyz_backup/
.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard
A directory with an ending slash (like
/mnt/sdcard/
) matches the files contained in the directory like using /mnt/sdcard/*
.

The action Copy Text from Clipboard copies the text on the clipboard to the specified variable.
Examples:
- Send the text on the clipboard directly by sms or text.
See action Script for a description.
clip_data

The action Copy Text to Clipboard copies the specified text to the clipboard.
Examples:
- Copy the scanned barcode value to the clipboard to paste it in the browser.
- Copy the text of an incoming SMS to the clipboard to paste it in a mail.

The action Create Calendar Event creates an event on the specified calendar of the device (Android 4+ required)
Examples:
- Create a calendar event based on the text of a received SMS.
- Create a calendar event for every received call.

The action Create Directories locally creates one or multiple directories.
Examples:
- Create a target directory
/mnt/sdcard/backup/
before copying files into this directory.

The action Delete App Cache deletes the cache files of the specified app. Android ignores this function for system apps.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Delete the browser cache every evening for security purposes.

The action Delete Files locally deletes one or multiple files or folders including contained files.
Examples:
- Monthly delete all files in the
/mnt/sdcard/download/
folder.
Examples:
/mnt/sdcard/download/*
matches all files and subfolders in thedownload
directory

The action Delete Flows deletes the specified flows.
Examples:
- Delete a flow before the flow is imported again with action Import Flows/Widgets.

The action Delete HTTP Request Cookies deletes the cookies of the desired domains that are stored by Automagic when executing action HTTP Request.
Examples:
- Delete all cookies to ensure that no cookies are sent in the next request.

The action Dismiss Slide to Unlock Keyguard unlocks the device when the slid-to-unlock keyguard is used. This action can not unlock a secure keyguard that requires to enter a password, PIN or pattern.
Warning: This function is not officially supported by Android and might not work on all devices.
Some devices require that the screen is off to dismiss the keyguard.
Some devices turn off the screen when the keyguard is dismissed. You can mitigate the problem by adding an action Turn Screen On to the flow after dismissing the keyguard.

The action Download URL directly downloads a file in the background to the defined directory.
Examples:
- Download a PDF newspaper every morning.
Examples:
http://example.com/
becomesnewspaper_ {triggertime,dateformat,yyyyMMdd} .pdf http://example.com/
newspaper_20110213.pdf
See action Script for a description.
file_path

The action Dropbox Create Directories creates one or multiple directories on Dropbox.
Examples:
- create a directory before files are uploaded.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.

The action Dropbox Delete Files deletes the defined files on Dropbox.
Examples:
- Delete all files in a folder before uploading new files to this folder to get rid of files you don't need anymore.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.
Examples:
/backup/export*
matches all files with a name starting withexport
in folder/backup

The action Dropbox Download Files downloads multiple files and directories recursively to your device.
Warning: This action downloads all specified files and overwrites already existing target files. The files will be downloaded even when the same file already exists on the device.
Warning: Dropbox limits the amount of data each user can transfer.
Examples:
- Download each morning the newest file of keypass containing your passwords to ensure you have the newest offline copy available.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.
Examples:
/backup/export*
matches all files with a name starting withexport
in folder/backup

The action Dropbox Init Variable File List lists the files of a directory that match the specified name pattern.
Examples:
- Get a list of files and download only the ones smaller than 1MB.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.
*
and ?
. Variables are supported.See action Script for a description.
files

The action Dropbox Upload File uploads one file to your Dropbox.
Examples:
- Upload a backup of all data in Gleeo Time Tracker to the your Dropbox.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.
Examples:
/mnt/sdcard/export_
becomes{triggertime, dateformat, yyyy_MM_dd} .csv /mnt/sdcard/
export_2011_02_13.csv

The action Dropbox Upload Files uploads one or multiple files and directories recursively to your Dropbox.
Warning: This action uploads all specified files and overwrites already existing target files. The files will be uploaded even when the same file already exists on Dropbox.
Warning: Dropbox limits the amount of data each user can transfer.
Examples:
- Upload a backup of all data in Gleeo Time Tracker to the your Dropbox.
Installing the Dropbox app should not be required but can help to circumvent authentication problems on some devices.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard

The action Enable WiFi Access Point enables one of the access point configurations and optionally prevents to connect to other access points by disabling them.
Examples:
- Enable a free access point at home and disable a paid access point.

The action End Call hangs up the current call.
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: This function requires root access on some devices.
- Let the phone call home for 15 seconds and automatically terminate the call to notify something.

The action Execute Command executes a shell command and stores the output in variables.
Examples:
ls -l
to list all files in the working directoryps
to store the running processes in the defined variableps > file.txt
to store the running processes in a filecat file1.txt > file2.txt
to copy a filecat /proc/wakelocks
to show the wake locks preventing your device from sleeping
You can use this for example to create a filename based on the current date:
ps > file- {triggertime,datetime,yyyyMMdd} .txt
.
Special characters in the command have to be escaped using backslash or placed in quotes as appropriate:
cat 'Test File1.txt' > 'Test File2.txt'
cat Test\ File1.txt > Test\ File2.txt
/bin/sh
to be interpreted.
The available commands vary from device to device. Variables are supported.
See action Script for a description.
stdout
stderr
exit_code

The action Execute Flows executes one or multiple flows specified in the field Flow pattern list.
Tip: It's also possible to execute utility flows that don't have their own trigger. Simply don't add a trigger to such a flow but ensure that the flow is enabled.
The executed flow will inherit the execution context with all variables of the parent flow.
The variables usually supplied by the trigger of the target flow will not be available since the trigger of the target flow is bypassed when using this action.
Examples:
- Execute all flows with the words battery save in the name when the battery reaches a critical level.
*
and ?
can be used to match similar named flows.Examples:
Test Flow
Test Flow, SMS Flow
*battery save*
See action Script for a description.
flow_count

The action Execute Root Command executes a shell command as root by passing the command to su
and stores the output in variables.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
reboot
to reboot the devicereboot -p
to shutdown
You can use this for example to create a filename based on the current date:
ps > file- {triggertime,datetime,yyyyMMdd} .txt
.
Special characters in the command have to be escaped using backslash or placed in quotes as appropriate:
cat 'Test File1.txt' > 'Test File2.txt'
cat Test\ File1.txt > Test\ File2.txt
su
to be interpreted.
The available commands vary from device to device. Variables are supported.
See action Script for a description.
stdout
stderr
exit_code

The action Execute SSH Command connects to an SSH server and executes a command.
Note: It can not be guaranteed that this action is compatible with all SSH servers.
Examples:
- Execute a command on a NAS every evening.
- Show the free memory of the server on a widget.
See action Script for a description.
stdout
stderr
exit_code

The action Exit Device Idle/Doze Mode exits the device idle/doze mode.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Exit the device idle/doze mode every morning at 6am to make the device work reliably again.

The action Export Flows exports the selected flows to the specified file.
Examples:
- Export all flows to a file and upload the file to Dropbox as a backup.
*
and ?
can be used to match similar named flows. Variables are supported.Examples:
Test Flow
Test Flow, SMS Flow
*time tracking*
*
and ?
can be used to match similar named flows. Variables are supported.*
and ?
can be used to match similar named widgets. Variables are supported.*
and ?
can be used to match similar named widgets. Variables are supported.See action Script for a description.
export_path

The action Flashlight enables or disables the flashlight of the device.
Examples:
- Turn on or off the flashlight using a toggle widget.

The action FTP Create Directories creates one or multiple directories on an FTP server.
Examples:
- create a directory before files are uploaded.

The action FTP Delete Files deletes the files specified on the FTP server.
Examples:
- Recursively delete all files in a directory on the server before uploading new files.
Examples:
/pub/export*
matches all files with a name starting withexport
in folder/pub

The action FTP Download Files downloads files and folders stored on an FTP server.
Examples:
- Recursively download a directory with music every morning.
Examples:
/pub/export*
matches all files with a name starting withexport
in folder/pub

The action FTP Init Variable File List lists the files of a directory that match the specified name pattern.
Examples:
- Get a list of files and download only the ones smaller than 1MB.
*
and ?
. Variables are supported.See action Script for a description.
files

The action FTP Upload File uploads one file to an FTP server.
Examples:
- Upload a backup of all data in Gleeo Time Tracker to the your company server.
Examples:
/mnt/sdcard/export_
becomes{triggertime, dateformat, yyyy_MM_dd} .csv /mnt/sdcard/
export_2011_02_13.csv

The action FTP Upload Files uploads files and folders to an FTP server.
Examples:
- Recursively upload a directory with photos every morning to an FTP server.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard

The action Gleeo Create Entry creates an entry of the specified project and task in Gleeo Time Tracker.
Examples:
- Track the amount of time spent in the Twitter app and create an entry in Gleeo Time Tracker at the end of the day.
The task name can be defined dynamically using variables.
Examples:
Phone Support for {incoming_number}
becomesPhone Support for 17001111111
Visiting {trigger}
becomesVisiting Customer X
(use different location triggers namedCustomer X
,Customer Y
etc.)

The action Gleeo Filesystem Export creates a CSV export of the defined projects and time range.
Examples:
- Backup all data in Gleeo Time Tracker to the SD card.
- Export the current month by pressing a shortcut on the launcher and attach the created file to a Google Mail message draft.
- Each month export all recorded entries of the month to the SD card and send the file by mail to your employer.
Semicolon
to simplify the import in Excel.Examples:
/mnt/sdcard/export_
becomes{triggertime, dateformat, yyyy_MM_dd} .csv /mnt/sdcard/
export_2011_02_13.csv /mnt/sdcard/export_
becomes{export_start_time, dateformat, yyyy_MM_dd}- {export_end_time, dateformat, yyyy_MM_dd} .csv /mnt/sdcard/
export_2011_03_01-2011_03_31.csv
See action Script for a description.
export_start_time
export_end_time
export_path

The action Gleeo Start Recording starts recording the defined project and task in Gleeo Time Tracker when this task is not already recording.
Examples:
- Start tracking the time when you arrive at your office.
- Start tracking the time when your employer calls.
- Start tracking the time when you press a shortcut on the launcher.
Variables are supported.
Examples:
Phone Support for {incoming_number}
becomesPhone Support for 17001111111
Visiting {trigger}
becomesVisiting Customer X
(use different location triggers namedCustomer X
,Customer Y
etc.)

The action Gleeo Stop Recording stops recording the currently recording task in Gleeo Time Tracker.
Examples:
- Stop tracking the time when you leave your office.
- Stop tracking the time every evening at 6pm and show an alert when you forgot to stop recording.

The action Google Drive Create Directories (Experimental) creates one or multiple directories on Google Drive.
Examples:
- create a directory before files are uploaded.

The action Google Drive Delete Files (Experimental) deletes the defined files on Dropbox.
Examples:
- Delete all files in a folder before uploading new files to this folder to get rid of files you don't need anymore.
Examples:
/backup/export*
matches all files with a name starting withexport
in folder/backup

The action Google Drive Download Files (Experimental) downloads multiple files and directories recursively to your device.
Warning: This action downloads all specified files and overwrites already existing target files. The files will be downloaded even when the same file already exists on the device.
Note: Google Drive allows to create duplicate files which is not possible on a regular filesystem. Automagic only considers the newest file in such a case and ignores duplicates.
Note: Google Documents are not downloaded.
Examples:
- Download each morning the newest file of keypass containing your passwords to ensure you have the newest offline copy available.
Examples:
/backup/export*
matches all files with a name starting withexport
in folder/backup

The action Google Drive Init Variable File List lists the files of a directory that match the specified name pattern.
Examples:
- Get a list of files and download only the ones smaller than 1MB.
*
and ?
. Variables are supported.See action Script for a description.
files

The action Google Drive Upload Files (Experimental) uploads one or multiple files and directories recursively to your Google Drive.
Warning: This action uploads all specified files and overwrites already existing target files.
Examples:
- Upload a backup of all data in Gleeo Time Tracker to the Google Drive.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard

The action Hide Custom Widget Overlay hides a previously shown overlay.
See action Script for a description.
widget_x_offset
widget_y_offset

The action Hide Custom Widget Overlay (Android Wear) hides a previously shown overlay.
See action Script for a description.
widget_x_offset
widget_y_offset

The action HTTP Request requests a resource from a server using the specified HTTP request method.
Note: This action is meant to be used for technical requests (REST and the like) and to process the response using scripts. If you simply want to download a file please use the action Download URL.
The action terminates with a status code of -1 for general errors. It will terminate with an error when not even a connection to the server can be established (network not available, IP can not be resolved etc.). Use an Exception-connection to handle such errors.
Examples:
- Fetch a web page of a weather service and test if it contains the word rain.
- Get the price of a product from an online retailers REST service.
Examples:
http://example.com/
becomesweather.html?ts= {triggertime,dateformat,yyyyMMdd} http://example.com/
weather.html?ts=20110213
application/x-www-form-urlencoded
to the server. The values are automatically URL encoded. Variables are supported.
Example:
Firstname=Hugo,Lastname=Habicht
Each line should start with the header name and a colon followed by the value to send.
Examples:
User-Agent: my own user agent
SOAPAction: "test"
Warning: Responses larger than 1MB are not supported in a variable.
See action Script for a description.
status_code
error_message
status_code
is set to -1header_*
header_
and the name of the header by replacing dash with underscore and converting the name to lowercase.Examples:
- Header
Accept
is stored in variableheader_accept
- Header
Accept-Encoding
is stored in variableheader_accept_encoding
Headers leading to an invalid variable name are ignored.

The action Import Flows imports all flows of the specified file. The imported flows are disabled. Already existing flows are not imported.
Flows can be enabled after importing when desired using action Set Flow State and the variable {imported_flow_names,listformat,comma}
.
Examples:
- Import a flow to lock the device on the stolen device.
See action Script for a description.
imported_flow_names
duplicate_flow_names

The action Init Variable Contact List stores the list of contacts in the specified variable.
Examples:
- Show the starred contacts in a selection list before calling the selected contact.
See action Script for a description.
contact_list

The action Init Variable File List lists all files or only the newly added files in a directory and stores the list in a variable.
Examples:
- Send all files of a directory by mail to your mail account.
- Send all new backup files of Gleeo Time Tracker to your inbox.
*
and ?
.Examples:
/mnt/sdcard/folder/*
/mnt/sdcard/GTT-export-20120101.csv
/mnt/sdcard/GTT-export-*.csv
/mnt/sdcard/file1,/mnt/sdcard/file2,/mnt/sdcard/file3
A file is considered to be new when it was not available the last time this action executed or the size of the file changed or the last modified time of the file has changed since the last execution of this action.
See action Script for a description.
files

The action Init Variable Image File loads the pixel data of an image into the specified local variable to modify the image with action Modify Image or to read color values of pixels with script function getPixelColor.
Warning: Loading large images uses a lot of internal memory which could cause Automagic to crash in the worst case. It's recommended to read only one image into memory and not to load very large images.
Examples:
- Load an image, shrink the size and send the smaller file by mail.
See action Script for a description.
image_data
image_width
image_height

The action Init Variable Image Metadata extracts the metadata (e.g. Exif tags) from an image and stores the values in a map (key=label/name of the tag, value=description or raw value of the tag).
Example to read the GPS location in an action Script:
location = getMapValue(image_metadata, "gps_location");
Tip: Condition Debug Dialog can be used to display the keys and values stored in the map.
Examples:
- Extract the GPS location and the thumbnail from a JPEG image.
thumbnail_image
.See action Script for a description.
image_metadata
thumbnail_image

The action Init Variable Location acquires one location from the defined provider and stores the location in the variable.
Note: Getting one location can take several seconds to complete. The passive provider might not return a location until another app is activating one of the location providers.
Examples:
- Send the location in response to an SMS containing the text Where are you? to the sender.
- Store the location coordinates in a file when the employer calls.
- Send the location and phone number by mail whenever you call someone.
Network
This provider uses the location provided by the cell tower and Wi-Fi signals. Depending on environment this provider can deliver location of about 60 meters of accuracy. Locations found using the cell tower can be very inaccurate (up to several kilometers or miles).
Passive
This provider delivers the location from the currently active provider (Network or GPS) without activating one of the providers by itself. This might result in very infrequent location updates.
GPS
This provider delivers the location using the GPS receiver. This provider usually uses more battery than the network provider.
High Accuracy (Experimental)
This provider delivers the finest available location using different sensors available on the device.
Balanced Power/Accuracy (Experimental)
This provider delivers the a location with an accuracy of about 100m and uses less battery than the high accuracy provider.
Low Power (Experimental)
This provider delivers the a location with an accuracy of about 10km.
No Power (Experimental)
This provider will only deliver locations when another app on the device has requested locations.
This can be useful to filter out locations calculated using the cell tower when also more exact locations using WiFi are available.
See action Script for a description.
location
location_accuracy
location_altitude
location_bearing
location_speed

The action Init Variable Next Alarm fills the time of the next currently known alarm into the specified variable.
Warning: This function is not officially supported by Android < 5.0 and might not work on all devices.
Examples:
- Get the time of the next alarm to show a reminder one hour before the alarm is reached.
See action Script for a description.
next_alarm

The action Init Variable Notifications on Statusbar stores all currently shown notifications as a list in a variable.
Examples:
- Send the texts of all shown notifications by mail to your account when you receive an SMS with the text get notifications.
See action Script for a description.
notifications
title
content_title
content_title_big
notification_text
(This function is not officially supported by Android and does not work with all notifications)notification_text_big
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_channel_id
(Android 8.0+)notification_priority
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_large_icon
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)notification_when
notification_number
notification_vibrate_default
notification_vibrate_pattern
notification_sound_default
notification_sound_uri
notification_people
(Android 4.4+)notification_info_text
(Android 4.4+)notification_sub_text
(Android 4.4+)notification_summary_text
(Android 4.4+)notification_progress
(Android 4.4+)notification_progress_max
(Android 4.4+)notification_progress_indeterminate
(Android 4.4+)notification_text_lines
(Android 4.4+)notification_background_image_uri
(Android 5+)notification_category
(Android 5+)notification_accent_color
(Android 5+)notification_ticker_text
notification_visibility
(Android 5+)notification_ongoing
notification_foreground_service
notification_local_only
notification_group
(Android 7+)notification_is_group_summary
(Android 7+)package_name
app_name
id
(Android 4.3+)buttons
(Android 4.1+, This function is not officially supported by Android and does not work with all notifications)
The action Init Variable Package Info loads information of the specified apps/packages and stores the information in a map.
Tip: Condition Debug Dialog can be used to display the keys and values stored in the map.
Examples:
- Load the list of permissions used by an app and check which permissions have been granted.
The map contains the package name as the key and a map with the queried information as value. Example shown as JSON:
{ "package1": {"version_name": xyz, "version_code": 123}, "package2": {"version_name": xyz, "version_code": 123} }
Example JSON queried for one app:
{ "com.android.vending": { "version_name": "6.4.12.C-all [0] 2744941", // the version name "version_code": 80641200, // the version number "first_install_time": 1230796800000, // the time at which the app was first installed (millis since 1970) "last_update_time": 1461091018180, // the time at which the app was last updated (millis since 1970) "install_location": -1, // -1=auto?, 0=auto, 1=internal only, 2=prefer external "application_info": { "data_dir": "/data/user/0/com.android.vending", // full path to a directory assigned to the package for its persistent data "class_name": "com.google.android.finsky.FinskyApp", // class implementing the Application object "source_dir": "/data/app/com.android.vending-2/base.apk", // full path to the base APK for this application "label": "Google Play Store", // the label of the app (current locale) "uid": 10024, // the kernel user-ID that has been assigned to this application "icon_uri": "android.resource://com.android.vending/2130903045", // URI to load the icon of the app "target_sdk_version": 23, // the API level that the application targets "enabled": true // whether or not the Android system can instantiate components of the application }, "requested_permissions": [ { "permission": "android.permission.WRITE_EXTERNAL_STORAGE", // the name of the permission "requested_permission_flag": 3, // 1=requested, 3=requested & granted "label": "modify or delete the contents of your USB storage", // the label of the permission "description": "Allows the app to write to the USB storage.", // the description of the permission "protection_level": 1, // protection level as number "protection_level_text": "dangerous", // protection level expressed as text "group": "android.permission-group.STORAGE", // the group name of the permission "group_label": "Storage", // the permission group label "group_description": "access photos, media, and files on your device" // the permission group description }, ... ], "activity_info": [ { "name": "com.android.vending.AssetBrowserActivity", "label": "Play Store", "icon_uri": "android.resource://com.android.vending/2130903045", "enabled": true, // whether the activity is enabled "exported": true // whether the activity can be used by other apps "permission": "com.google.android..." // permission required to access this activity (when defined) }, ], "receiver_info": [ { "name": "com.google.android.gcm.GCMBroadcastReceiver", "label": "Google Play Store", "enabled": true, "exported": true, "permission": "com.google.android.c2dm.permission.SEND" }, ... ], "provider_info": [ { "name": "com.google.android.finsky.providers.RecentSuggestionsProvider", "label": "Google Play Store", "authority": "com.google.android.finsky.RecentSuggestionsProvider", "enabled": true, "exported": false }, ... ], "service_info": [ { "name": "com.google.android.finsky.services.ReviewsService", "label": "Google Play Store", "enabled": true, "exported": true }, ... ] }, ... }
Please note that additional key value pairs might be added in future versions of Automagic.
See action Script for a description.
package_info

The action Init Variable Random Number generates a random number in a defined interval.
Examples:
- Simulate to throw a dice.
- Play a random sound for every received SMS.
See action Script for a description.
n

The action Init Variable System Setting reads a value from the system setting database and stores the value in a variable.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global Settings valid for all users of the device (Android 4.2+)
See action Script for a description.
setting

The action Init Variable System Setting (Android Wear) reads a value from the system setting database and stores the value in a variable.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global Settings valid for all users of the device (Android 4.2+)
See action Script for a description.
setting

The action Init Variable Text File reads the contents of a text file into the specified variable. Files up to 1MB are supported. Binary files are not supported.
Examples:
- Read a text file containing a mail template and send the text by mail.
See action Script for a description.
file_text

The action Init Variable WiFi Access Point List lists all configured or only enabled/disabled wifi networks into a variable.
Examples:
- Show a list of WiFI networks and allow to connect to the selected one.
See action Script for a description.
access_points

The action Init Variables Bluetooth Device List lists all paired, connected or not connected bluetooth devices in a variable.
Examples:
- Show a dialog of all not connected bluetooth devices and attempt to connect to a selected device.
See action Script for a description.
device_names
device_addresses

The action Init Variables Call Log initializes variables with the values of the last entry of the call log.
Examples:
- Update a widget with the values of the last call.
See action Script for a description.
call_number
call_time
call_duration
call_type
call_cached_name
call_new

The action Init Variables Contact Info loads information of the specified contact and stores the information in a map.
Tip: Condition Debug Dialog can be used to display the keys and values stored in the map.
Examples:
- Show all phone numbers of a contact.
Example JSON of a contact:
{ "display_name": "Contact XYZ", // name of the contact "photo_thumb_uri": "content://com.android.contacts/contacts/124/photo", // URI of the small image "photo_uri": "content://com.android.contacts/display_photo/3", // URI of the larger image "last_time_contacted": 1479667934531, // point in time of the last contact, 0 when not known "starred": true, // whether the contact is in the favorites or not "times_contacted": 1, // count of contacts (according to contact app) "phone_list": [{ // list of phone numbers "number": "+41987654321", "type": 2, "type_label": "Mobile" }, ... ], "organization_list": [{ // list of organizations "company": "Company X", "type": 2, "type_label": "Other", "title": "Company" }, ... ], "note_list": [{ // list of notes "note": "Note 1" }, ... ], "nickname_list": [{ // list of nicknames "nickname": "MR. incredible", "type": 0, "type_label": "Other" }, ... ], "email_list": [{ // list of email addresses "email": "example@gmail.com", "type": 1, "type_label": "Home" }, ... ], "relation_list": [{ // list of relations "relation": "Person 123", "type": 1, "type_label": "Assistant }, ... ], "structured_postal_list": [{ // list of addresses "formatted_address": "Mainstreet X\n1234 City", "type": 1, "type_label": "Home", "street": "Mainstreet X", "city": "City", "postcode": "1234" }, ... ], "structured_name_list": [{ // list of the names "display_name": "Contact XYZ", "given_name": "Contact", "family_name": "XYZ" }, ... ], "website_list": [{ // list of websites "url": "www.automagic4android.com", "type": 7, "type_label": "Other" }, ... ], "sip_address_list": [{ // list of the SIP addresses "number": "+41987654321", "type": 2, "type_label": "Mobile" }, ... ], "event_list": [{ // list of events "start_date": "1978-07-04", "type": 3, "type_label": "Birthday" }, ...], "group_list": [ // list of the groups "Group1", "Group2", "Group3" ] }
Please note that additional key value pairs might be added in future versions of Automagic.
Examples of access to values in action Script:
name = contact_info["display_name"]; photo_uri = contact_info["photo_uri"]; phone1 = contact_info["phone_list"][0]["number"]; phone2 = contact_info["phone_list"][1]["number"]; phone2type = contact_info["phone_list"][1]["type_label"]; nickname1 = contact_info["nickname_list"][0]["nickname"];
See action Script for a description.
contact_info

The action Init Variables Device Orientation measures the device orientation using the accelerometer and magnetometer sensors of the device.
Warning: This action uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples:
- Show your current orientation value in a popup.
- Select the task to record by changing the device orientation.
See action Script for a description.
azimuth
pitch
roll

The action Init Variables File Info provides information about a file as variables to the flow.
Examples:
- Check if a file is older than one week and delete the file.
dir
, file
or other
).See action Script for a description.
file_type
dir
, file
or other
)file_exists
true
or false
)file_size
file_last_modified

The action Init Variables Gleeo Project Structure initializes a variable with the domains, projects or tasks from Gleeo Time Tracker.
Examples:
- Load all Tasks of a project to show a selection list in Automagic.
See action Script for a description.
domains
projects
tasks

The action Init Variables Gleeo Recording checks if a task is recording in Gleeo Time Tracker and stores the recording project and task in variables.
Examples:
- Store the recording task when someone calls and start recording the same task again when the call ends.
- Don't use a funny alert sound when you are working for a special project.
See action Script for a description.
recording
recording_domain_name
recording_project_title
recording_task_name
recording_start

The action Init Variables Media Metadata loads the metadata of a media file into local variables (see variables section below).
Examples:
- Load the title of an mp3 and show the title in a notification.
See action Script for a description.
media_cd_track_number
media_album
media_artist
media_author
media_composer
media_date
media_genre
media_title
media_year
media_duration
media_num_tracks
media_writer
media_mimetype
media_albumartist
media_disc_number
media_compilation
media_has_audio
media_has_video
(Android 4+)media_video_width
(Android 4+)media_video_height
(Android 4+)media_bitrate
(Android 4+)media_location
(Android 4.0.3+)media_video_rotation
(Android 4.2+)media_album_art

The action Init Variables Media Session (Experimental) fills the information of the media session of the specified media player into variables.
Examples:
- Check if Google Play Music is playing a track.
See action Script for a description.
playback_state
playback_position
title
subtitle
description
icon
icon_uri
media_duration

The action Init Variables Network Statistics queries the transferred amount of data of the specified network interfaces.
The network statistics are recorded by the operating system itself and is stored in blocks of two hours (device dependent). Queries that don't fall on such a two hour limit, will be interpolated (device dependent) so results might not be accurate especially for short time intervals.
The data of the network statistics is stored for each UID (user identification) of the executed process. Many apps/packages of the system are aggregated under UID 1000 and can not be differentiated further. The package selection shows the UID in brackets.
Data not available to the network statistics of the device can not be considered by this action (e.g. when a device is factory reset).
Examples:
- Periodically check the amount of data transferred by a specific app and show a warning when 100 MB are exceeded.
See action Script for a description.
transmitted_bytes
received_bytes
total_bytes

The action Init Variables Network Traffic initializes variables with the transmitted and received bytes since device boot of the system or a specific user ID that runs a given app.
Note: Some devices do not collect user/app specific values. This is also a known problem of Android 4.3.
Examples:
- Store the number of transferred data for each day in a log file.
See action Script for a description.
total_transmitted_bytes
total_received_bytes
mobile_transmitted_bytes
mobile_received_bytes
uid_transmitted_bytes
uid_received_bytes

The action Init Variables Phone Info initializes the desired variables (not all values are available on all devices).
Examples:
- Check the network operator once an hour.
See action Script for a description.
device_id
device_software_version
line1_number
network_country_iso
network_operator
network_operator_name
phone_type
sim_state
sim_country_iso
sim_operator
sim_operator_name
sim_serial_number
subscriber_id
voice_mail_alpha_tag
voice_mail_number

The action Input Dialog shows an input dialog with an input text field, password field, single- or multi-selection list.
Examples:
- Ask the user whether he wants to turn WiFi off or not.
- Ask for the password to use for an FTP upload.
- Ask whether airplane mode should be activated in the evening. Activate airplane mode when the user does not respond within 30 seconds.
Can be one of:
Multi-line text
for multiple lines of plain text inputSingle-line text
for a single line of plain text inputPassword
for a password inputPIN
for a pin inputNumber
to type number charactersPhone number
to type characters used in phone numbersDate
to show a date pickerTime
to show a time pickerDate & Time
to show a dialog with a date & time pickerSingle Choice Menu
for a list of values like a menu without OK, Cancel buttonsMulti Choice
for a list of values the user can choose multiple values from
Text
and Password
)Single Choice
and Multi Choice
)Whether the user has cancelled the dialog can be evaluated using the variable
operation
(see below).The default value for date/time input types must be formatted as specified below:
Date
: Patternyyyy-MM-dd
for example2014-01-25
or when using a variable{variable,dateformat,yyyy-MM-dd}
Time
: PatternHH:mm
(24-hour format) for example14:20
or when using a variable{variable,dateformat,HH:mm}
Date & Time
: Patternyyyy-MM-dd HH:mm
(time in 24-hour format) for example2014-01-25 14:20
or when using a variable{variable,dateformat,yyyy-MM-dd HH:mm}
- Show when locked: Show the input dialog even when the device is locked
- Turn screen on: Turn the screen on when the dialog is shown initially
- Keep screen on: Keep the screen on as long as the dialog is shown (power button still allows turn off the screen)
- Enlarge dialog width: Enlarge the width of the dialog to cover almost the entire screen
- Keyboard hint to capitalize sentences: Give a hint to the keyboard that sentences should be started with an uppercase letter
See action Script for a description.
operation
Can be one of:
ok
when the user pressed the OK buttoncancel
when the user pressed the cancel button or the back keytimeout
when the dialog was closed by a timeout
value
Multi Choice
or a date when the input dialog type was of type date/time.
value
for type time is the entered time of the current date.
index
Single Choice
list or -1 when not definableindices
Multi Choice
list or -1 for every not definable value
The action Input Speech (Android Wear) starts the speech recognition of the device and provides the recognized text to the flow in variable value
. The speech recognition engine usually requires network access.
Examples:
- Control Automagic using spoken commands.
See action Script for a description.
value
operation

The action Input Speech (Experimental) starts the speech recognition of the device and provides the recognized text to the flow in variable value
. The speech recognition engine usually requires network access.
Examples:
- Control Automagic using spoken commands.
See action Script for a description.
value
operation

The action Kill App kills the processes of an app running in the background.
Warning: The operating system does not allow to kill an app currently running in the foreground.
Examples:
- Kill the browser app when another app is started to reclaim memory.

The action Kill App Process sends the defined signal to the process using the kill
command.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Kill the browser app when another app is started to reclaim memory.
See action Script for a description.
pid
importance
lru
uid

The action Launch App starts an app or a specific activity of an app.
Tip: Some activities require special permissions to be launched. Check the log after testing the action when an activity fails to start.
Examples:
- Start the development settings directly using a shortcut.
- Start the shopping list app when you are near the shopping mall.
Leave empty to launch the default activity of a package. Variables are supported.

The action Launch Shortcut starts a previously defined shortcut.
A new shortcut can either be built with button Build Shortcut or you can let Automagic capture the shortcut by leaving the action configuration open and by creating the shortcut in the other app. Automagic will show a notification on screen Shortcut captured by Automagic when the shortcut was properly detected by Automagic. Note that not all apps support both ways to create a shortcut.
Examples:
- Open a specific settings page.
- Play an audio playlist.
- Directly display a contact.

The action Lock Device immediately locks the device.
Note: The device admin functions have to be enabled in the preferences to use this action.
Examples:
- Lock the device when an SMS contains device lost!.

The action Mail with Gmail sends a mail using your Gmail account.
Note: If you have enabled 2-step verification in your Google account then you need to create an application specific password for login in the settings of your google account: https://www.google.com/settings/security
Examples:
- Forward every SMS as a mail to your inbox.
- Send your location every 30 minutes to your girlfriend.
- Send the new Gleeo Time Tracker backups to your inbox.
xyz@gmail.com
. Variables are supported.Info: The password is stored encrypted on the internal device storage and is not part of the regular
flows.xml
file.
Tip: Files stored in a list by action Init Variable File List can be formatted using
{files, listformat, comma}
to a comma separated list.

The action Map Values takes an input value (the key) and maps it to an output value.
Examples:
- Scan the barcode on the laboratory door and map the value to a project/task to start the time tracker.
Examples:
{barcode_text}
to map a barcode{incoming_number}
to map the number of an incoming call
Mapping example:
key1=>value1
key2=>value2
The part before the assignment operator (
=>
) is used to specify the key values to match. A comma separated list can be used to specify multiple keys for one target value. Glob pattern characters *
and ?
can also be used to match multiple values.The part after the assignment operator (
=>
) defines the target value to use as the map value.The mapping rules are evaluated line by line from top to bottom. The first matching rule is applied.
Multi key mapping example:
key1=>value1
key2,key3,key4=>value2
Glob pattern mapping example:
key1=>value1
key?=>value2
key*=>value3
In the above example, the value
key1
would be mapped to value1
because it is the first line matching the input value.The values
key2
to key9
would be matched by the second rule.The value
key123
would be matched by the third rule.When no rule matches the output value is set to
null
.If you want to map a few known bar codes to meaningful task names but also want to use the plain barcode when no mapping rule matches, you can use the following approach (the input value would be set to
{barcode_text}
in this example):Mapping definition:
123321123=>Meeting
989878945=>Office
*=>{barcode_text}
The third rule matches all unknown bar code values and maps the value to the original value. You can also use a condition Expression to detect not mappable values.
The last twenty not mappable values detected while executing the action will be remembered in a list and can be added by using the button Add unmapped values...
See action Script for a description.
mapped_value

The action Message Dialog shows a dialog with a message and an optional title.
Examples:
- Show the text of an incoming SMS directly in a dialog.

The action Modify Automagic Notification on Statusbar modifies the permanent notification usually shown by Automagic for technical reasons. The appearance of a modified notification is reset to the default when one of the settings in Automagic pertaining to the notification is changed.
Examples:
- Show a different icon when a particular flow is running.
Custom icons are supported starting with Android 6.
Note: Android will usually show all non-transparent parts as white so it's recommended to create custom PNG images with a transparent background and a white color to paint the contents.
Note: Option 'Custom icon' can lead to crashes on some devices with Android 6.0.
Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action:
action_number
: contains the number of the action (1, 2 or 3)action_text
: the text label of the selected action button on the notification

The action Modify Call Log marks the entries of the call log as acknowledged or clears the call log.
Examples:
- Delete the call log every Monday morning.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples:
- +17001111111
- +17001111111,+17002222222
- *70033311*
- *70033311*,*70033?22*
+
, -
and .
are removed before comparing the number.

The action Modify Image can be used to modify an image that was previously loaded with an action Init Variable Image File.
Examples:
- Load an image, shrink the size and send the smaller file by mail.
- Scale: change the size of the image either respecting the aspect ratio or by distorting the image
- Rotate: rotates the image by 90° or 180°
- Mirror: mirrors the image horizontally or vertically
- Crop & Scale: extracts the largest possible area from the center of the image by respecting the aspect ratio of the original image and scales to the desired size
- Crop to Selection: crops the image to the defined area
See action Script for a description.
image_data
image_width
image_height

The action Modify Notification Channel modifies a notification channel.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Change notifications about app updates to important at day and unimportant at night to avoid interruptions at night.

The action Move Files locally moves one or a list of files to the specified target directory or file.
A move is implemented to use a rename
operation when possible. If a rename
is not possible, the file/folder is copied to the target directory and afterwards the source is deleted.
Examples:
- Move all files in directory
/mnt/sdcard/xyz/
to the folder/mnt/sdcard/xyz_backup/
. - Rename directory
/mnt/sdcard/xyz
to/mnt/sdcard/xyz_backup
.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard
A directory with an ending slash (like
/mnt/sdcard/
) matches the files contained in the directory like using /mnt/sdcard/*
.

The action Notification on Screen shows a notification on the screen for a short period of time.
Examples:
- Show a notification when a background flow sends your location by mail.
- Show a notification with the text of a received SMS.

The action Notification on Screen (Android Wear) shows a notification on the screen for a short period of time.
Examples:
- Show a notification when a background flow sends your location by mail.
- Show a notification with the text of a received SMS.

The action Notification on Statusbar shows a notification on the status bar. The notification is displayed until the notification is clicked or clear is pressed.
Examples:
- Show a notification when a background flow sends your location by mail.
Custom icons are supported starting with Android 6.
Note: Android will usually show all non-transparent parts as white so it's recommended to create custom PNG images with a transparent background and a white color to paint the contents.
Note: Option 'Custom icon' can lead to crashes on some devices with Android 6.0.
Apps can not change the channel settings once the channel has been created. Use the button Channel settings… to change the settings once the channel has been created or use an action Modify Notification Channel to change the settings on supported devices.
The initial channel settings are inferred from the settings in the notification action based on the settings like Play Sound, Vibrate, Flash LED, Priority and Visibility.
This is useful when the notification is used for trigger Notification on Statusbar Selected or when the notification is used to show a profile like status.
A notification with the same ID replaces an older notification of the same ID. The notification can be removed from the statusbar using the action Remove Notification on Statusbar.
The button Remove, X can be used to remove a notification with this ID on the statusbar.
Settings like Play Sound and Vibrate can be ignored by the system when the priority is low or forced when the priority is high.
Note: On Android 8+ the priority is mapped to notification channel importance as follows: Minimum‑>Low, Low‑>Medium, Normal‑>High, High‑>Urgent, Maximum‑>Maximum.
Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action:
action_number
: contains the number of the action (1, 2 or 3)action_text
: the text label of the selected action button on the notification
Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action:
action_number
: contains the number of the action (1, 2 or 3)action_text
: the text label of the selected action button on the notificationinput_value
: the selected input value or the recognized text of the speech input

The action Open URL in Browser opens the browser with the specified URL.
Tip: The browser can also be used to download a file by using a URL pointing to a PDF or other downloadable file.
Examples:
- Open a news page every morning.
- Download a PDF every morning at 5am.
Tip: You can use a variable to open n URL that changes dynamically by date.
http://test.com/ newspaper_ {triggertime,dateformat,yyyyMMdd} .pdf
will be replaced to
http://test.com/ newspaper_20120123.pdf

The action Perform Action on Notification on Statusbar clicks the notification or one of the action buttons which are usually available in the big, expanded notification on Android 4.1+.
The flow must be executed by a trigger Notification on Statusbar Displayed or the action after a condition Notification on Statusbar Displayed otherwise Automagic has no possibility to access the notification.
Warning: Android 4.1+ is required. This function is not officially supported by Android and might not work on all devices.
Examples:
- Automatically archive a mail when the mail contains a specific text.

The action Plugin (Experimental) executes the action defined in a plugin. Most plugins don't offer a way to let Automagic wait for the plugin to finish. You can use an action Sleep to wait a short amount of time.
Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins.
Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions.
Only a few new plugins support this mechanism, this mechanism should usually not be used when the plugin does not request to be executed this way. This option will automatically be enabled when the plugin is configured and the plugin supports synchronous execution.
See action Script for a description.
Tasker variables

The action Post Tweet posts a regular Twitter message.
Examples:
- Tweet your location every hour.

The action Post Twitter Direct Message posts a Twitter direct message to one recipient.
Examples:
- Tweet your location every hour to your wife.

The action Query Content Provider allows to load data from a content provider of another app. A content provider presents data to Automagic as one or more tables that are similar to the tables found in a relational database.
Warning: This function allows to access data that's not officially made available by Android which might not be available on all device models and Android Version.
Table
: Provides a list of rows each containing a list of values to the flow.Table (transposed)
: Same as table but transposed. Provides a list for each column containing all values of the column.List
: Converts the returned table to a flat list.Single value
: Provides only the first value of the returned data to the flow.Text
: Converts the returned table to a CSV-text.
See action Script for a description.
result

The action Reboot restarts the device.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Restart the device every morning at 6am.
recovery
to boot into recovery mode. Variables are supported.
The action Remove Notification Missed Calls removes the missed calls notification in the statusbar.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Remove the missed calls notification when a number on a blocking list called in your absence.

The action Remove Notification on Statusbar removes the specified or all notifications on the statusbar added by the action Notification on Statusbar.
Example:
- Show a notification when a sound profile is active and remove the notification when the sound profile is deactivated.
All removes all removable notifications of Automagic irrespective of the ID.
Trigger Notification on Statusbar Displayed provides the ID of the notification in variable
id
. Use {id}
to remove the notification that triggered the flow.

The action Remove WiFi Access Point removes a WiFi configuration.
Warning: This function can only remove access points that have been added by Automagic on Android 6+.
Examples:
- Remove a previously added public access point to clean up the list.

The action Request Sync starts the synchronisation process of one or multiple accounts or some parts of the accounts. The order and the exact timing of the synchronisation is controlled by Android.
The action does not wait for the synchronisation to finish.
Examples:
- Disable the automatic synchronisation to save battery but execute the synchronisation manually every hour between 8am and 8pm.
*
synchronises all accountsGoogle:*
synchronises all Google accounts
*
to synchronize all parts of the account.
Glob patterns can be used to match multiple authorities. Variables are supported.*
synchronises all authorities of the specified accountscom.android.calendar
synchronises all calendars of the specified accounts

The action Reregister Media Button Receiver registers Automagic as a receiver of media button events again.
This is useful in conjunction with trigger Media Button Receiver when another app requested to receive the media button events and Automagic thus does not receive the events anymore.

The action Restore Audio Volumes restores the audio volumes previously stored in global variables by action Store Audio Volumes.
Examples:
- Store the audio volumes when a meeting begins, set all volumes to zero and restore the previously volumes when the meeting ends.

The action Save Variable in Image File saves the pixel data that was previously loaded with an action Init Variable Image File into a file.
Examples:
- Load an image, shrink the size and send the smaller file by mail.

The action Save Widget to Image File saves the current image of a widget to a file.
Examples:
- Add a text over an image and send the resulting image as an email attachment.

The action Scan Barcode opens an activity to scan a barcode using the camera of the device.
Tip: You can use an action Map Values to map known barcode values like a QR code on a laboratory door to a project/task.
Examples:
- Start recording the time in Gleeo Time Tracker based on a barcode on a laboratory door.
- Scan a barcode on a book and open the browser to search the book on Amazon.
See action Script for a description.
operation
Can be one of:
ok
when a bar code has been successfully scannedcancel
when the user pressed the back button or another button to leave the activitytimeout
when the activity was closed by a timeout
barcode_text
barcode_format

The action Script executes a script doing some simple calculations and can be used to modify variables.
Following list of keywords are reserved and are therefore not allowed to be used as a variable name:
abstract alias and AND assert
boolean break byte
case catch char class const continue
def default do double
else elsif ensure enum extends
false final finally float for
goto
if implements import in instanceof int interface
long
mod
native new next not NOT null
or OR
package private protected public
redo repeat rescue retry return
self short static strictfp super switch synchronized
then this throw throws to transient true try
undef unless until
void volatile
when while
xor XOR
yield
Only a few of the reserved keywords are currently used but are reserved for future extensions of the scripting language.
Scripts can contain comments that are not executed when the script is interpreted.
- text after
//
to the end of the line - text between
/*
and*/
. Such a comment can also span multiple lines.
a=1+2;//this is a comment b=a+3; c=b+a; /* this is a multiline comment */ d=c*2;
A value like a number or a string can be stored in a variable using the assignment operator =
Variable names are case sensitive. A variable name has to start with a letter, a currency symbol (such as "$") or a connecting punctuation character (such as "_"). The rest of the variable name can also contain digits. Unicode characters are supported, but it is highly recommended to use US-ASCII characters.
a = 3;//assign the number three to the variable a b = a;//assign the value stored in variable a to the variable b
There exist two types of variable scopes:
global_
.Examples of flow local variables with a value assigned:
a = 1;
number one stored in a variable called 'a'var1 = 1.234;
decimal number 1.234 stored in a variable called 'var1'var_123 = "Hello World";
string "Hello World" stored in a variable called 'var_123'_m = true;
boolean value 'true' stored in a variable called '_m'var2 = a;
stores the value stored in variable 'a' in a variable called 'var2'
global_
is global and therefore accessible by other flows and will also be persisted to the external memory and reloaded when you stop/restart the Automagic service.Examples of global variables with a value assigned:
global_a = 1;
number one stored in a variable called 'global_a'global_var1 = 1.234;
decimal number 1.234 stored in a variable called 'global_var1'global_var_123 = "Hello World";
string "Hello World" stored in a variable called 'global_var_123'global_m = true;
boolean value 'true' stored in a variable called 'global_m'
Variables are references to values (like a pointer). Assigning the value stored in a variable to another variable does not copy the value but both variables point to the exact same value.
This is especially important when modifiable values like lists are used.
Example:
a = newList(1, 2, 3); b = a; //at this point both variables a and b point to the exact // same list (the list only exists once) addElement(a, 4); //the list now contains 1, 2, 3, 4 //both variables a and b still point to the same list //both loops therefore print the values 1, 2, 3 and 4 in the log: for (x in a) { log("{x}"); } for (x in b) { log("{x}"); }
Following operators are supported in expressions:
+
addition and string concatenation-
subtraction*
multiplication/
division%
modulo division<
less than<=
less than or equal>
greater than>=
greater than or equal==
equal!=
not equalAND
,&&
andOR
,||
orXOR
,^
exclusive orNOT
,!
not (unary)
An expression is a construct made up of variables, operators and function calls, that evaluates to a single value.
Examples:42
1+2
a=1
b=a+1
c=(a+1)*(b-3)
global_a=1
a=sqrt(9)
b=addDays(triggertime, 3)
c=replace("hello automagic", "automagic", "world")
b=addDays(triggertime, sqrt(9))
b="Hello " + "World"
a=true
b=false
c=a AND b OR c>=5
c=NOT a AND NOT b
Inline expressions in strings can be used to replace a part of the string by a variable or expression. The rules described here also apply to the text fields of triggers, conditions and actions documented in the help page with Variables are supported.
An inline expression is enclosed in curly braces: {expression}
var1="Test";
var2="This is a {var1}";
'var2' will contain the string "This is a Test" after the script is evaluatedvar="one plus two is {1 + 2}";
'var' is evaluated to "one plus two is 3"
Inline expressions can be formatted by defining a format type and depending on the format type a pattern to use: {var,formattype,pattern}
var="Today is {getDate(),
dateformat, dd.MM.yyyy}";
'var' will contain the string "Today is 21.07.2012"var="It's {getDate(),
dateformat, HH:mm}";
'var' will contain the string "It's 12:32"var="It's {getDate(),
dateformat, timezone,UTC, HH:mm}";
'var' will contain the string "It's 10:32"var="Value: {1.456789,
numberformat, 0.00}";
'var' is evaluated to "Value: 1.46"var="I'm here: {location,
locationformat, decimal}";
'var' is evaluated to "I'm here: 46.76817,7.603751"var="{files,
listformat, comma}";
'var' is evaluated to "/mnt/sdcard/file1,/mnt/sdcard/file2"
dateformat
: Formats the date using the specified date pattern. See pattern characters for a description of the supported patterns.
The optional sub-formattimezone
along with the name of the timezone can be used to define the timezone used to format the date/time. Accepted timezone names are either UTC, GMT or the Olson name of a timezone name of the form Area/Location, such asAmerica/Los_Angeles
(device dependent). GMT is used for unknown timezone names.
Examples:{triggertime,
dateformat, timezone,UTC, HH:mm} {triggertime,
dateformat, timezone,America/Los_Angeles, HH:mm} {triggertime,
dateformat, timezone,Europe/London, HH:mm} {triggertime,
dateformat, timezone,Europe/Paris, HH:mm} {triggertime,
dateformat, timezone,Africa/Harare, HH:mm}
numberformat
: Formats the number using the specified decimal format. See pattern characters for a description of the supported patterns.locationformat
: Formats the address of the location when available in a single line of text when no format is specified. (Data connection is required)
Following locationformat patterns are supported:multiline
: Formats the address as a multiline text. (Data connection is required)decimal
: Formats latitude,longitude as decimal numbers (+/-DDD.DDDDD). Example: 46.76817,7.603751.microdegrees
: Formats latitude,longitude multiplied by 1'000'000 as integers. Example: 46768355,7604022. This format can be useful in a call to a REST service.swiss
: Formats latitude,longitude converted to the Swiss coordinate system.
listformat
: Formats the list of values as a multiline text with one item per line when no pattern is specified.
Following listformat patterns are supported:comma
: Formats the list of values as a comma separated list.semicolon
: Formats the list of values as a semicolon separated list.
jsonformat
: Formats the value as JSON fragment.
Inline expressions in strings with single quotes are not interpreted. This can be helpful for regular expressions, where a quantifier like {2} in the pattern ([0-9]){2}.* should not be replaced with 2.
Example:var='Today is {getDate(),
dateformat, dd.MM.yyyy}';
'var' is evaluated to 'Today is {getDate(),dateformat, dd.MM.yyyy}'
if
StatementExample:
if (a<3) { b = 0; } else { b = 1; }In this example variable
b
is assigned the value zero when the variable a
contains a value less than 3, b
is assigned the value one when the variable a
contains a value greater or equal to 3.
for
LoopExample:
list=newList(1, 2, 3); for (a in list) { log("a contains {a}"); }This example would print the following output in the log:
a contains 1 a contains 2 a contains 3
[<number> to <number>, <step size>]
:Examples:
list = [1 to 10];//without the optional step size for (a in list) { log(a); } //logs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 //inlined for (a in [1 to 10]) { log(a); } //logs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 //inlined with step size of 2 for (a in [1 to 10, 2]) { log(a); } //logs 1, 3, 5, 7, 9 //inlined with negative step size of -3 for (a in [10 to 1, -3]) { log(a); } //logs 10, 7, 4, 1
Examples:
list = [1 to 10]; a = list[0];//get first element of the list: 1 a = list[1];//get second element of the list: 2 list[2] = 999;//assigns 999 to the third element of the list map = newMap(); map["key1"] = 1;//creates a map entry key1-->1 map["key2"] = 2;//creates a map entry key2-->2 a = map["key1"];//gets the value of entry with key1: 1 a = map["key2"];//gets the value of entry with key2: 2
while
LoopExample:
a = 0; while (a < 10) { log(a); a = a + 1; } //logs 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
return
statementExample:
a = null; if (a == null) { return; } log("X");//not reached since return terminates the script
break
statementExample:
for (a in [1 to 10]) { if (a == 4) { break; } log(a); } log("X"); //logs 1, 2, 3, X
continue
statementExample:
for (a in [1 to 10]) { if (a == 4) { continue; } log(a); } log("X"); //logs 1, 2, 3, 5, 6, 7, 8, 9, 10, X
Examples:
a = sin(1.2);//evaluates to 0.932039... a = max(1, 2, 3, 4, 5);//evaluates to 5 a = isEmpty([1 to 10]);//evaluates to false a = containsElement([1 to 10, 2], 3);//evaluates to trueTip: Please also see the Script examples page that shows some commonly used script snippets.
Object convertNull(Object value, Object defaultValue)
Returns the value of the first argument or returnsdefault
when the value is null.Number abs(Number value)
Returns the absolute value ofvalue
.Number pow(Number base, Number exponent)
Returns the value of the first argument raised to the power of the second argument.Number sqrt(Number a)
Returns the square root of the number.Number sin(Number a)
Returns the sine of the angle in radians.Number cos(Number a)
Returns the cosine of the angle in radians.Number tan(Number a)
Returns the tangent of the angle in radians.Number asin(Number a)
Returns the sine of the angle in radians.Number acos(Number a)
Returns the arc cosine of the angle in radians.Number atan(Number a)
Returns the arc tangent of the angle in radians.Number atan2(Number y, Number x)
Returns the angle of the polar representation of the rectangular coordinate (x, y).Number sinh(Number a)
Returns the hyperbolic sine of the value.Number cosh(Number a)
Returns the hyperbolic cosine of the value.Number tanh(Number a)
Returns the hyperbolic tangent of the value.Number log10(Number a)
Returns the base 10 logarithm of the value.Number ln(Number a)
Returns the natural logarithm (base e) of the value.Number toRadians(Number a)
Converts the Number from degrees to radians.Number toDegrees(Number a)
Converts the Number from radians to degrees.Number round(Number a)
Rounds the number to the nearest integer.Number ceil(Number a)
Returns the next highest integer value by rounding up value if necessary.Number floor(Number a)
Returns the next lowest integer value by rounding down value if necessary.Date addDays(Date d, Number a)
Returns a new date by addinga
number of days to the dated
.Date addHours(Date d, Number a)
Returns a new date by addinga
number of hours to the dated
.Date addMinutes(Date d, Number a)
Returns a new Date by addinga
number of minutes to the dated
.Date addSeconds(Date d, Number a)
Returns a new date by addinga
number of seconds to the dated
.Date getDate()
Returns the current date and time.Date getDate(String date, String pattern)
Converts the string to a date using the specified pattern. (see pattern characters)Date getDate(Number year, Number month, Number day)
Returns the Date specified by the arguments.Date getDate(Number year, Number month, Number day, Number hours, Number minutes, Number seconds)
Returns the date specified by the arguments.Date getDate(Date date, Number hours, Number minutes, Number seconds)
Returns the date specified by the arguments.Date getDate(Date date, Number hours, Number minutes, Number seconds, String timezone)
Returns the date specified by the arguments in the defined timezone.Number getUptimeMillis()
Returns milliseconds since boot, not counting time spent in deep sleep.Number getElapsedRealtimeMillis()
Returns milliseconds since boot, including time spent in sleep.Number getDurationMillis(String duration)
Returns the duration in milliseconds specified by the duration string (e.g. "2m 15s" returns 135000).String getDurationString(Number duration)
Returns the duration string representing the specified milliseconds (e.g. 135000 returns "2m 15s").Number getByteSize(String byteSize)
Returns the number of bytes specified by the string (e.g. "10kb 15b" returns 10255).String getByteSizeString(Number byteSize)
Returns the formatted byte string representing the specified bytes (e.g. 10255 returns "10kb 15b").Number toNumber(String number)
Converts the specified parameter to a number.Number min(Number n1, Number n2, ...)
Returns the smallest number of the arguments.Number max(Number n1, Number n2, ...)
Returns the largest number of the arguments.Boolean isEmpty(String s)
Returns whether the string is empty or not.Number length(String s)
Returns the number of characters in strings
.String substring(String s, Number start, Number end)
Returns the substring of the specified string.String substring(String s, Number start)
Returns the substring starting at the specified index.String left(String s, Number length)
Returns the firstlength
characters of the specified string.String right(String s, Number length)
Returns the lastlength
characters of the specified string.Number indexOf(String s, String search)
Returns the first index ofsearch
ins
.Number indexOf(String s, String search, Number start)
Returns the first index ofsearch
afterstart
ins
.Number lastIndexOf(String s, String search)
Returns the last index ofsearch
ins
.Number lastIndexOf(String s, String search, Number start)
Returns the last index ofsearch
beforestart
ins
.Boolean startsWith(String s, String prefix)
Checks whether the strings
starts withprefix
.Boolean endsWith(String s, String suffix)
Checks whether the strings
ends withsuffix
.Boolean contains(String s, String search)
Checks whether the strings
contains the substringsearch
.List split(String s, String pattern)
Splits the strings
into a list of strings by using the regular expressionpattern
as the delimiter. (see Regular expressions)List splitCSVRecord(String s)
Splits the comma delimited strings
into a list of tokens. Takes double quotes for escaped fields into consideration.List splitCSVRecords(String s)
Splits multiple lines of a comma delimited strings
into a list (per line) of list of tokens. Takes double quotes for escaped fields into consideration.String join(List list, String delimiter)
Joins the elements of the list into a string by separating the elements with the specifieddelimiter
.Boolean matches(String s, String pattern)
Returns whether the strings
matches the regular expressionpattern
. (see Regular expressions)Boolean matches(String s, String pattern, List groups)
Returns whether the strings
matches the regular expressionpattern
and fills the captured groups into the existing listgroups
. (see Regular expressions)List findAll(String s, String pattern)
Returns a list of all matched values ins
of regexpattern
. (see Regular expressions)List findAll(String s, String pattern, boolean returnGroups)
Returns a list of all matched values ins
of regexpattern
. Optionally item consists of a list of the matched groups. (see Regular expressions)String replace(String s, String search, String replace)
Returns a modified string by replacing all occurrences ofsearch
withreplace
in strings
.String replaceAll(String s, String regex, String replacement)
Returns a modified string by replacing all substrings matchingregex
withreplacement
in strings
. (see Regular expressions)String trim(String s)
Returns a modified string by removing all leading and trailing whitespace from strings
.String concat(Object o1, ...)
Returns the string concatenation of the specified objects.String toUpperCase(String s)
Converts the string to upper case using the rules of the default locale.String toLowerCase(String s)
Converts the string to lower case using the rules of the default locale.String encodeURLForm(String urlPart)
URL-encodes the specifiedurlPart
(for application/x-www-form-urlencoded, spaces are encoded as +).String encodeURL(String urlPart)
URL-encodes the specifiedurlPart
(spaces are encoded as %20).String encodeHTML(String text)
HTML-encodes the specifiedtext
.List newList(Object o1, ...)
Returns a new list containing the specified objects.List copyList(List list)
Returns a copy of specified list (flat copy).Number length(List list)
Returns the number of elements inlist
.Boolean isEmpty(List list)
Returns whether the list contains any elements or not.List addElement(List list, Object o1)
Returns the same list after adding the object at the end of the list. Returns a new list when the list should not exist yet.List addElement(List list, Number index, Object o1)
Returns the same list after adding the object at the specified index (zero based).List addAllElements(List list, List elementsToAdd)
Returns the same list after adding all elements specified in listelementsToAdd
.List removeDuplicateElements(List list)
Returns the same list after removing all duplicates.List removeElementValue(List list, Object o1)
Returns the same list after removing all elements with the specified value.List removeAllElementValues(List list, List elementsToRemove)
Returns the same list after removing all elements contained in the second list.Boolean containsElement(List list, Object o1)
Returnstrue
when the list contains the specified element.Object removeElement(List list, Number index)
Removes the object at the specified index (zero based) and returns the removed object.List removeElements(List list, Number fromIndex, Number toIndex)
Removes the objects at the specified index range (zero based, [fromIndex,toIndex[) and returns the removed objects in a list.Object getElement(List list, Number index)
Returns the object at the specified index (zero based).List setElement(List list, Number index, Object value)
Sets the object at the specified index (zero based).Object getRandomElement(List list)
Returns a random element of the list.List shuffleList(List list)
Randomly shuffles the elements of the list.Number indexOfElement(List list, Object value)
Returns the first index of the element in the list or -1 when the element is not contained in the list.Number indexOfElement(List list, Object value, Number start)
Returns the first index of the element in the list that is bigger or equal tostart
or -1 when the element is not contained in the list.List sort(List list, Boolean casesensitive, Boolean natural)
Modifies the list by sorting the values.List reverse(List list)
Modifies the list by reversing the order of the contained values.Map newMap()
Returns a new empty mapMap newMapFromValues(String key1, Object value1, ...)
Returns a new map initialized to contain the specified keys and values.Boolean isEmpty(Map map)
Returns whether the map contains any elements or not.Number length(Map map)
Returns the number of elements inmap
.Map copyMap(Map map)
Returns a copy of specified map (flat copy).Map addMapEntry(Map map, String key, Object value)
Adds a new entrykey->value
to the map and returns the map. Returns a new map when the map should not exist yet.Map addAllMapEntries(Map map, Map entriesToAdd)
Adds all entries of the second map to the first map and returns the first map.Object getMapValue(Map map, String key)
Returns the object forkey
ornull
when no mapping for key exists.Object getMapValue(Map map, String key, Object default)
Returns the object forkey
ordefault
when no mapping for key exists ormap
is null.Object removeMapEntry(Map map, String key)
Removes the entry for the givenkey
and returns the value.List getMapKeys(Map map)
Returns a list of the keys ofmap
.List getMapValues(Map map)
Returns a list of the values ofmap
.String evaluateXPathAsString(String xml, String xpath)
Evaluates the XPath expression on the given XML and returns the result as a string. (see XPath Specification)String hash(String value, String encoding, String algorithm)
Calculates the hash ofvalue
using the specifiedencoding
(likeUTF-8
orUTF-16LE
) and hashingalgorithm
(likeMD5
orSHA1
).String toJSON(Object value)
Converts the specified object to a JSON string.String toJSON(Object value, Boolean indent)
Converts the specified object to a JSON string, indented or not.Object fromJSON(String value)
Converts the specified JSON string into an object.Object log(Object value)
Logs the specified object in the Automagic log and returns the unmodified object.Object eval(String script)
Evaluates the string as a script and returns the value of the last expression.Number random()
Returns a random number between 0.0 and 1.0 (exclusive).Number random(Number low, Number high)
Returns a random number betweenlow
andhigh
(inclusive).Boolean sleep(Number milliseconds)
Waits for the specified amount ofmilliseconds
.Boolean sleep(String duration)
Waits for the specifiedduration
like "2m 30s".Boolean existsFile(String path)
Checks whether the file denoted bypath
exists or not.Boolean isDirectory(String path)
Checks whether the file denoted bypath
is a directory.String getExternalStorageDir()
Returns the path to the primary external storage directory.Number getPixelColor(Bitmap image_data, Number x, Number y)
Returns the color (argb) of the pixel of theimage
at locationx
,y
.Number getRed(Number color)
Returns the red component of the specifiedcolor
.Number getGreen(Number color)
Returns the green component of the specifiedcolor
.Number getBlue(Number color)
Returns the blue component of the specifiedcolor
.Number getAlpha(Number color)
Returns the alpha component of the specifiedcolor
.Number newColor(Number a, Number r, Number g, Number b)
Returns a new color from the specified ARGB components.Number distance(Location loc1, Location loc2)
Calculates the distance between locationsloc1
andloc2
in meters.Location newLocation(Number latitude, Number longitude)
Creates a new Location for the specifiedlatitude
andlongitude
.String setHTTPResponseHeader(String header, String value)
Sets the HTTP response header to the specified value and returns the value.Number setHTTPResponseStatus(Number status)
Sets the HTTP response status to the specified value and returns the value.Boolean isList(Object value)
Returns whether the specified value is a List or not.Boolean isMap(Object value)
Returns whether the specified value is a Map or not.Boolean isString(Object value)
Returns whether the specified value is a String or not.Boolean isNumber(Object value)
Returns whether the specified value is a Number or not.Boolean isBoolean(Object value)
Returns whether the specified value is a Boolean or not.Boolean isLocation(Object value)
Returns whether the specified value is a Location or not.Object getWidgetElementProperty(String widgetName, String elementName, String property)
Gets the current value of the property of the specified widget element.Object setWidgetElementProperty(String widgetName, String elementName, String property, Object value)
Sets the given property of the specified widget element tovalue
.Boolean refreshWidget(String widgetName, Boolean reloadImages)
Refreshes the widget and optionally also reloads images.String getAppName(String packageName)
Returns the display name of the app from the specified package or null when not available.String getActivityName(String packageName, String className)
Returns the display name of the activity from the specified package and class or null when not available.String getServiceName(String packageName, String className)
Returns the display name of the service from the specified package and class or null when not available.List getFlowNames()
Returns a list containing the names of all flows.List getFlowNamesByGroup(String group)
Returns a list containing the names of the flows of the specifiedgroup
.List getFlowGroupNames()
Returns a list containing the names of the flow groups.List getWidgetNames()
Returns a list containing the names of all widgets.Map getFlowStatisticsDuration()
Returns a map of the executed flows. Key=Flow name, Value=total execution duration in milliseconds, sorted by value descending.Map getFlowStatisticsCount()
Returns a map of the executed flows. Key=Flow name, Value=total execution count, sorted by value descending.Boolean resetFlowStatistics()
Resets the flow statistics.Object getValue(String name, Object default)
Returns the value of the variable namedname
or returnsdefault
when the variable is undefined or null.Object setValue(String name, Object value)
Sets the variable namedname
tovalue
and returnsvalue
Object removeVariable(String name)
Removes the variable namedname
.List getVariableNames()
Returns a list of all variables currently available (local and global).Number getAndroidSDKVersion()
Returns the SDK version number of the Android framework. (see Android API versions)Object getContext()
Returns the context of the application.Object callJavaStaticMethod(String className, String methodSignature, Object params, ...)
Calls the defined public static method of the defined class.Object callJavaConstructor(String className, String constructorSignature, Object params, ...)
Calls the public constructor of the defined class.Object callJavaMethod(Object obj, String className, String methodSignature, Object params, ...)
Calls the specified instance method on the defined object.Object getJavaStaticField(String className, String fieldName)
Returns the value of the specified public static field.Object setJavaStaticField(String className, String fieldName, Object value)
Sets the value of the specified public static field.Object getJavaField(Object obj, String className, String fieldName)
Returns the value of the specified public instance field.Object setJavaField(Object obj, String className, String fieldName, Object value)
Sets the value of the specified public instance field.
s = "{a=1;b=2}"; log(s);//logs 2 a = true; b = if (a) 1 else 2; log(b);//logs 1 for (a in [0 to 10]) { log(if(a<5) "X" else "-"); } //logs X, X, X, X, X, -, -, -, -, -, - b=0; log(for(a in [1 to 10]) {b=b+a}); //logs 55

The action Seek Action Sound seeks in the currently executing action Sound.
Examples:
- Seek to the beginning of a song.

The action Send Broadcast send a broadcast using the specified intent. Please also see the documentation of the Android Intent class.
Tip: Some broadcast receivers require special permissions to be launched. Check the log after testing the action when the broadcast receiver fails.
Examples:
- Control an app that exposes its actions using a broadcast receiver.
Additionally to the regular built in functions of Automagic also the following functions are available to add the extras to the intent:
putString(key, value)
putBoolean(key, value)
putFloat(key, value)
putDouble(key, value)
putByte(key, value)
putShort(key, value)
putChar(key, value)
putInt(key, value)
putLong(key, value)
putUri(key, value)
putBooleanArray(key, value)
putByteArray(key, value)
putIntArray(key, value)
putIntegerArrayList(key, value)
putLongArray(key, value)
putFloatArray(key, value)
putDoubleArray(key, value)
putShortArray(key, value)
putCharArray(key, value)
putStringArray(key, value)
putStringArrayList(key, value)
putUriArray(key, value)
putUriArrayList(key, value)
Example:
putString("key1", "Hello");See action Script for a description of the scripting language.
putBoolean("key2", true);
putDouble("key3", 1.23);
putInt("key4", 42);
putInt("key5", a+4*b);
Following functions are supported:
getString(String key)
getChar(String key, String defaultValue)
getBoolean(String key, Boolean defaultValue)
getFloat(String key, Number defaultValue)
getDouble(String key, Number defaultValue)
getByte(String key, Number defaultValue)
getShort(String key, Number defaultValue)
getInt(String key, Number defaultValue)
getLong(String key, Number defaultValue)
getBundle(String key)
getUri(String key)
getBooleanArray(String key)
getByteArray(String key)
getShortArray(String key)
getCharArray(String key)
getIntArray(String key)
getIntegerArrayList(String key)
getLongArray(String key)
getFloatArray(String key)
getDoubleArray(String key)
getStringArray(String key)
getUriArray(String key)
getUriArrayList(String key)
getParcelableAsString(String key)
getParcelableArrayAsString(String key)
getParcelableArrayListAsString(String key)
getParcelable(String key)
See action Script for a description.
result_code
(only if Send ordered broadcast is enabled)operation
(only if Send ordered broadcast is enabled)data_string
(only if Send ordered broadcast is enabled)abort_broadcast
(only if Send ordered broadcast is enabled)
The action Send SMS sends an SMS to the specified phone number.
Examples:
- Send an SMS with your location as a response to an SMS containing the text Where are you?.
- Send an SMS to your partner when you are on your way home.
Example:
- use
{sms_sender}
to fill in the phone number received in an SMS Received trigger.
Example:
- use
{location,
to fill in a nearby address of the location. The location can be determined using an action Init Variable Location.locationformat}
See action Script for a description.
sms_delivery_report_status
(only when a synchronous delivery report is requested and received)
The action Send USSD Request sends a USSD request to the provider.
Warning: Some versions of Android don't properly handle USSD request failures so a dialog of the system might be shown when a USSD request fails which causes the action to timeout after 30 seconds.
Examples:
- Query the prepaid balance.
See action Script for a description.
ussd_failure_code
(only provided on error)ussd_response
(only provided on success)
The action Send Wake on LAN Packet sends a Wake on LAN packet using UDP to the specified IP address and port.
Examples:
- Start your NAS (Network Attached Storage) daily at 6am.

The action Set Airplane Mode sets the airplane mode of the phone on or off.
Warning: This function requires root access starting with Android 4.2 and is not officially supported by Android.
Examples:
- Reduce radiation at night by turning on the airplane mode.
- Turn on airplane mode to reduce battery usage when battery level is below 20%.

The action Set Alarm creates an alarm in the alarm app available on the device.
Warning: Not all alarm apps support all options.

The action Set App Notification Peekable changes the setting whether app notifications of an app can be emphasized by sliding briefly into view.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Turn the peekable setting off for some apps when watching a movie.

The action Set App Notification Priority changes the setting whether app notifications are important or not for a particular app.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Change the priority of mail notifications to unimportant at night.

The action Set App Notification State enables or disables the capability of an app to post notifications.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Prevent that an incoming call displays a notification when the device is surveyed in the background.

The action Set Audio Manager Mode changes the mode of the audio manager to either Normal, Ringtone or In call. The audio mode encompasses audio routing AND the behavior of the telephony layer.

The action Set Audio Stream Volume changes the volume of a audio stream of a specific type.
Examples:
- Reduce ringer volume when you are in your office.
- Increase music volume when you plug in the earphones.

The action Set Auto Sync State turns the automatic synchronisation on or off.
Examples:
- Turn the automatic synchronisation off at night.
- Turn off the automatic synchronisation of the company account on weekends.
*
changes all accountsGoogle:*
changes all Google accounts
*
to change all parts of the account.
Glob patterns can be used to match multiple authorities. Variables are supported.*
changes all authorities of the specified accountscom.android.calendar
changes all calendars of the specified accounts

The action Set Accelerometer Rotation turns on or off the Auto-rotate screen setting.
Note: An application can request to use the accelerometer for screen orientation changes, even when this setting is turned off.

The action Set Battery Saver Mode turns on the battery saver mode of the device (Android 5+). Battery saver mode can not be enabled when the device is charging.
Warning: This function does not work for manufacturer specific battery saving modes like Samsungs (Ultra-)energy saving mode or Sony and HTC specific modes. Please use action Set System Setting on such devices.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Turn on the battery saver at night when no charging adapter is available.

The action Set Bluetooth SCO State turns Bluetooth SCO for communications on or off.
Examples:
- Turn Bluetooth SCO off even when a headset is connected.
Check Start Bluetooth SCO to route the audio to the bluetooth device or Stop Bluetooth SCO to stop routing the audio to your bluetooth device when it was previously started with Automagic.
Note: Starting/stopping Bluetooth SCO is not supported on all devices and is known to be buggy on some devices.

The action Set Bluetooth State turns Bluetooth globally on or off.
Examples:
- Turn Bluetooth on when the phone is connected to a power source.
- Turn Bluetooth off when the battery level is below 30%.

The action Set Bluetooth Tethering State turns Bluetooth tethering setting on or off.
Note: This action does not supply the Bluetooth tethering feature by itself, it only turns on the setting. Some providers remove the Bluetooth tethering feature. This action can not turn on tethering on such a phone.
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: This function requires Android 3+.

The action Set Camera Usage State allows or denies the camera usage for apps.
Examples:
- Avoid that an app can use the camera for privacy reasons.

The action Set Car UI Mode puts the device into car UI mode.
Note: Not supported by all devices.
Examples:
- Launch the car dock UI mode of an app when you don't actually own the car dock.

The action Set Cyanogen/LineageOS Profile changes the currently set Cyanogen/LineageOS profile.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Change the profile to 'at home' when the WiFi is connected.

The action Set Data Roaming State turns the global data roaming setting on or off.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
- Activate data roaming abroad every morning for 10 minutes to synchronize the mails and deactivate data roaming again for the rest of the day.

The action Set Default Input Method changes the current input method/keyboard.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Use Hacker's Keyboard in landscape mode and otherwise the default keyboard.

The action Set Ringtone sets the default ringtone of the specified type (ringtone, alarm or notification).
Examples:
- Use a different ringtone at home.

The action Set Disabled Keyguard Features asks the system to disable the specified list of features on the lock screen (usually only affects secure lock screens like PIN, password lock screen).
Note: Other active device administrators might also disable some features. Automagic has no possibility to remove restrictions imposed by other device administrators.
Examples:
- Disable notifications on the lock screen when not at home.

The action Set Flow State enables or disables one or many flows.
Examples:
- Disable all flows using networking features when you are roaming.
- Disable all time tracking flows on Saturday and Sunday.
*
and ?
can be used to match similar named flows. Variables are supported.Examples:
Test Flow
Test Flow, SMS Flow
*time tracking*
*
and ?
can be used to match similar named flows. Variables are supported.
The action Set GPS State turns GPS globally on or off.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Turn GPS on when Google Maps is started.

The action Set Immersive Mode forces immersive/fullscreen mode.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Play a game in immersive mode even when the game itself does not yet allow to select this mode.
- Reset to default: Resets to the device default so the device can use the default mode
- Without navigation: Force fullscreen/immersive mode with navigation buttons hidden
- With navigation: Force fullscreen/immersive mode with navigation buttons shown

The action Set Interruptions Mode changes the mode whether alarms and notifications are allowed to interrupt you.
Examples:
- Turn off interruptions at night.

The action Set Keyguard State globally disables or reenables the keyguard after it was disabled by this action.
Warning: The device keyguard will not turn on even when locking the device using the power button when the keyguard is disabled using this action (device specific).
Warning: The official API will be removed in a future release of Android and this action will stop working depending on Android version and device manufacturer.
Examples:
- Disable the keyguard when the shopping list is started from the background in a specific location.
- Reenable the keyguard when the shopping list app is stopped.

The action Set LineageOS System Setting stores the specified value in the settings database of the system.
Warning: Modifying system settings to unsupported values can possibly harm your device or crash the system. Use at your own risk!
Note: Changes to some settings are not immediately picked up by the system but require an additional event to occur like turning the screen off and back on. Some settings need to be changed by special APIs, changing the value of such settings in the settings database are ignored by the system.
Note: adb
can be used on some versions of Android to grant the permissions to modify settings from category secure and global without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic lineageos.permission.WRITE_SECURE_SETTINGS
Examples:
- Change the value of a ROM specific setting not available in a regular action in Automagic.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global settings valid for all users of the device

The action Set Live Wallpaper changes the wallpaper of the phone to the defined live wallpaper.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Change the wallpaper at home.
- Change the wallpaper when an SMS is received.

The action Set Lock Pattern State enables or disables the system setting whether the lock pattern should be used as the screen lock.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
- Deactivate the pattern lock at home
- Secure setting: Changes the setting in the regular settings database of Android (Android 4.2 and below)
- Database: Directly accesses the database containing the lock settings (Android 4.3+)
- Service: Asks the system service to change the setting (Android 4.3+)

The action Set Lock PIN/Password sets the PIN/Password of the screen lock or resets the screen lock.
The action can be used to deactivate the screen lock:
- Important: Set the screen lock in the settings of Android to 'None'
- activate the desired PIN/Password screen lock in the settings of Android
- use the option 'Clear PIN/Password' in the action to disable the screen lock
Starting with Android 7, you can only use the action to set the PIN/Password when no PIN/Password is set yet so you can no longer use the action to remove a PIN/Password, except when Automagic is set as the device owner.
Examples:
- Deactivate the screen lock when you are connected to the WiFi at home.

The action Set Microphone Mute mutes or unmutes the microphone of the phone.
Examples:
- Mute the microphone when the device screen is facing down.

The action Set Mobile Datanetwork State turns the mobile datanetwork on or off.
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: This function requires root access on some devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Turn the mobile datanetwork off at night.

The action Set Mobile Network Mode (2G/3G) changes the network mode of the phone.
Warning: This function is not officially supported by Android and might not work on all devices.

The action Set Network Location State changes the setting whether the system can use WiFi access points and the mobile network to determine your location.
Note: Android shows a confirmation dialog on some devices.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Turn on the network location when Google Maps is started.

The action Set NFC State turns NFC globally on or off.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Turn NFC on when entering the office to scan NFC tags.

The action Set Night Mode turns the night mode of the device on or off or activates the automatic switch based on time and location. Changes to the night mode are only effective when the car or desk mode is enabled on a device.
Note: Not supported by all devices.
Examples:
- Activate the night mode of the device at 10pm and turn back to normal mode at 6am.

The action Set Proximity Screen Off State turns on the function of Android that turns the display off, when the proximity sensor detects an object.
Warning: This function is not officially supported by Android <4.4 and might not work on all devices.
Examples:
- Turn the display for a VoIP-app off, whenever the device is held to the head.

The action Set Restrict Background Data State
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Restrict background data at night to reduce data transfer.

The action Set Ringer Mode changes the ringer to either Normal, Silent or Vibrate mode.
Note for Android 5+: The real silent mode has been removed by Google on Android 5. Activating silent mode instead switches the device interruption mode to Priority interruptions only. Please use action Set Interruptions Mode to switch between all three interruption modes.
Note for Android 6+: Google introduced a new mode called Alarms only. Activating silent mode now switches the device interruption/do not disturb mode to Alarms only. Please use action Set Interruptions Mode to switch between all four interruption modes.
Examples:
- Turn your phone to vibrate in your office.
- Turn your phone to normal mode when plugged in to a power adapter.
- Turn your phone to normal and maximise the ringer volume when you get an SMS containing the text Phone Lost!

The action Set Screen Brightness changes the screen brightness.
Examples:
- Turn down the screen brightness when the battery is below 50%.
- Turn the screen brightness to maximum when the power adapter is connected.
Warning: This function is not officially supported by Android and might not work on all devices.

The action Set Screen Orientation forces the device to use the specified screen orientation setting. It can be used to force the screen to always use landscape mode or to use the sensor to enable reverse portrait and reverse landscape orientations.
Warning: This function is not officially supported by Android and might not work on all devices. Some apps like launchers or games might crash when the screen can not be changed to the rotation required by the app.
Examples:
- Force the device to use landscape mode even for the launcher.
- Reset to default: Reset to device default so the orientation is determined by the system
- Landscape: Force landscape
- Portrait: Force portrait
- Sensor: Force the use of the sensor detected orientation, even when an app requests landscape only
- Don't use sensor: Don't allow the use of the sensor to determine the orientation
- Sensor Landscape: Landscape or reverse landscape as determined by the sensor (from Android 2.3)
- Sensor Portrait: Portrait or reverse portrait as determined by the sensor (from Android 2.3)
- Reverse Landscape: Force reverse landscape (from Android 2.3)
- Reverse Portrait: Force reverse portrait (from Android 2.3)
- Sensor all orientations: All four possible orientations as determined by the sensor (from Android 2.3)

The action Set Screen Timeout changes the screen timeout.
Examples:
- Raise the screen timeout to 10 Minutes when the browser is started.
- Lower the screen timeout to 15 Seconds when the battery is almost empty.
Note: Not all devices support all timeouts. Some devices round the value to the most similar value as soon as the Android settings page is opened. Other devices modify the value to the minimum of (15 seconds) when the value is not supported.

The action Set Speakerphone State turns the speakerphone of the phone on or off. On most devices a call must be active for this action to have any effect.
Examples:
- Turn the speakerphone on an incoming call and the phone is in the car dock.

The action Set System Locale changes the currently use system locale.
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices. (Android 4.2+)
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.CHANGE_CONFIGURATION

The action Set System Setting stores the specified value in the settings database of the system.
Warning: Modifying system settings to unsupported values can possibly harm your device or crash the system. Use at your own risk!
Note: Changes to some settings are not immediately picked up by the system but require an additional event to occur like turning the screen off and back on. Some settings need to be changed by special APIs, changing the value of such settings in the settings database are ignored by the system.
Note: adb
can be used on some versions of Android to grant the permissions to modify settings from category secure and global without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
Examples:
- Change the value of a ROM specific setting not available in a regular action in Automagic.
Category: | System |
Name: | notification_light_pulse |
Value: | 0 = off1 = on |
Category: | Secure |
Name: | twilight_mode |
Value: | 0 = off1 = on2 = automatic |
Category: | Secure |
Name: | location_mode |
Value: | 0 = location mode off1 = Device only2 = Battery saving3 = High accuracy |
Alternatively:
Category: | Secure |
Name: | location_providers_allowed |
Value: | +gps = turn GPS on-gps = turn GPS off+network = turn Network on-network = turn Network off |
Warning: Only change one value at a time! Changing multiple values at once will result in an inconsistent setting value which can only be fixed by a factory reset. |
Category: | Global |
Name: | mobile_data |
Value: | 0 = mobile data off1 = mobile data on |
Category: | System |
Name: | lge_notification_light_pulse |
Value: | 0 = off1 = on |
Category: | System |
Name: | driving_mode_on |
Value: | 0 = off1 = on |
Category: | System |
Name: | psm_switch |
Value: | 0 = off1 = on |
Category: | System |
Name: | dormant_switch_onoff |
Value: | 0 = off1 = on |
Category: | System |
Name: | multi_window_enabled |
Value: | 0 = off1 = on |
Category: | System |
Name: | sbeam_mode |
Value: | 0 = off1 = on |
Category: | System |
Name: | VIB_RECVCALL_MAGNITUDE VIB_NOTIFICATION_MAGNITUDE VIB_FEEDBACK_MAGNITUDE |
Value: | 0 = weak to5 = strong |
Category: | System |
Name: | car_mode_on |
Value: | 0 = off1 = on |
Category: | System |
Name: | powersaving_switch |
Value: | 0 = off1 = on |
Category: | System |
Name: | dormant_switch_onoff |
Value: | 0 = off1 = on |
Category: | System |
Name: | multi_window_enabled |
Value: | 0 = off1 = on |
Category: | System |
Name: | toolbox_onoff |
Value: | 0 = off1 = on |
Category: | System |
Name: | intelligent_sleep_mode |
Value: | 0 = off1 = on |
Category: | System |
Name: | smart_pause |
Value: | 0 = off1 = on |
Category: | System |
Name: | auto_adjust_touch |
Value: | 0 = off1 = on |
Category: | System |
Name: | VIB_RECVCALL_MAGNITUDE VIB_NOTIFICATION_MAGNITUDE VIB_FEEDBACK_MAGNITUDE |
Value: | 0 = weak to5 = strong |
Category: | System |
Name: | expanded_desktop_state |
Value: | 0 = off1 = on |
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global settings valid for all users of the device (Android 4.2+)

The action Set System Setting (Android Wear) stores the specified value in the settings database of the system.
Warning: Modifying system settings to unsupported values can possibly harm your device or crash the system. Use at your own risk!
Note: Changes to some settings are not immediately picked up by the system but require an addition event to occur like turning the screen off and back on. Some settings need to be changed by special APIs, changing the value of such settings in the settings database are ignored by the system.
Examples:
- Change the value of a ROM specific setting not available in a regular action in Automagic.
- System: for regular settings
- Secure: for settings which can usually not be modified
- Global: for global settings valid for all users of the device (Android 4.2+)

The action Set Telephony Radio State turns the radio of the phone on or off.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Turn off the radio at night to save battery.

The action Set Timer creates a timer in a compatible timer app installed on the device.

The action Set USB Debugging State enables or disables the USB debugging setting.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Note: adb
can be used on some versions of Android to grant the permissions to execute the action without root:
- Install
adb
on a computer (search internet on how to install adb) - enable USB Debugging in System settings -> Developer options on your Android device
- connect your Android device to the computer
- execute following command in a terminal:
adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
- Enable USB debugging at work and at home but disable USB debugging elsewhere.

The action Set USB Tethering State turns USB tethering on or off.
Note: This action does not supply the USB tethering feature by itself, it only turns on the setting. Some providers remove the USB tethering feature. This action can not turn on tethering on such a phone.
Warning: This function is not officially supported by Android and might not work on all devices.
Warning: This function requires root access starting with Android 4.0.
Examples:
- Turn on USB tethering when USB is connected.
- Turn off USB tethering when the battery level is below 50%.

The action Set Vibrate on Ring State changes the setting whether the device should vibrate on ring or not.
Warning: This function is not officially supported by Android and might not work on all devices.

The action Set Wallpaper changes the wallpaper of the phone to the defined static image.
Examples:
- Change the wallpaper at home.
- Change the wallpaper when an SMS is received.
See action Script for a description.
wallpaper_path

The action Set WiFi Access Point Priority sets the priority of an access point configuration to control which access point is chosen to connect to by the phone.
Note: The algorithm used by the device to determine which access point to use and if the device will reconnect to another access point is not known and might vary between devices, versions and manufacturer.
Examples:
- Prefer a free access point over a paid one when both access points are available.

The action Set WiFi Sleep Policy changes the currently active sleep policy.
Warning: This function requires root access starting with Android 4.2 and is not officially supported by Android.
Examples:
- Always activate WiFi even when you are not using your mobile phone to keep the connection to your media center active.
- Only activate WiFi when you actively use your mobile phone.
Note: Disabling WiFi when the device is not active can increase mobile data usage when applications transmit data in the background.

The action Set WiFi State turns WiFi globally on or off.
Examples:
- Turn WiFi on when the phone is connected to a power source.
- Turn WiFi off when the battery level is below 30%.

The action Set WiFi State (Android Wear) turns WiFi globally on or off.
Examples:
- Turn WiFi on when the phone is connected to a power source.
- Turn WiFi off when the battery level is below 30%.

The action Set Wifi Tethering State turns WiFi tethering on or off.
Note: This action does not supply the WiFi tethering feature by itself, it only turns on the setting. Some providers remove the WiFi tethering feature. This action can not turn on tethering on such a phone.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Turn on WiFi tethering when a power adapter is connected.
- Turn off WiFi tethering when the battery level is below 50%.

The action Show Call Log opens the built-in App to show the call log.

The action Show Control UI Gesture Recorder shows the dialog for recording gestures to simulate user interactions (like action Control UI->Show overlay control->Gesture)
Examples:
- Show the recording UI after a delay in case the red buttons are preventing navigation to the desired target UI.

The action Show Control UI Infos shows the dialog for recording clicks to simulate user interactions (like action Control UI->Show overlay control->Info)
Examples:
- Show the recording UI after a delay in case the red buttons are preventing navigation to the desired target UI.

The action Show Custom Widget Overlay displays a custom Widget (defined within Automagic) on an arbitrary position on the display. The overlay is also shown on the lock screen on many Android versions.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Show the battery percentage as a semi-transparent rectangle over the statusbar.
- Prevent accidental touches by displaying an overlay that covers the entire screen.
- Shade the screen to a darker level than the built-in screen brightness control allows by displaying a semi transparent overlay covering the entire screen.
The same identification can be used in multiple actions to display the same overlay in different configurations depending on situation (e.g.different settings when in landscape or portrait).
This option might not work on all devices, especially on newer versions of Android (Android 8+).
This option can prevent certain apps like video players to temporarily override the screen brightness.
Older Version of Android only respect this option when option Use accessibility service is enabled.

The action Show Custom Widget Overlay (Android Wear) displays a custom Widget (defined within Automagic) on an arbitrary position on the display.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples:
- Show the battery percentage as a semi-transparent rectangle over the statusbar.
- Prevent accidental touches by displaying an overlay that covers the entire screen.
- Shade the screen to a darker level than the built-in screen brightness control allows by displaying a semi transparent overlay covering the entire screen.
The same identification can be used in multiple actions to display the same overlay in different configurations depending on situation (e.g.different settings when in landscape or portrait).

The action Show Home Screen launches the home screen.
Note for developers: The selected page is passed as an int-extra with name net.dinglisch.android.tasker.extras.HOME_PAGE to the launcher.

The action Show Input Method Selector shows the screen to select the input method/keyboard.
Examples:
- Open the input method selector to change the keyboard using action Control UI.

The action Shutdown shuts the device down.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.

The action Silence Ringer silences the ringer and stops the vibrator when an incoming call is currently ringing.
Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples:
- Silence the ringer on a call after 5 seconds when you are in a meeting.

The action Sleep pauses the flow execution for a certain amount of time.
Note: Please uncheck the option Keep device awake when the period is longer than one to two minutes and the functions of the flow does not require an active device CPU.
Examples:
- Sleep a second when a vibrate action is executing.
- Slow down a countdown flow.
Unchecking this option will not prevent the device from falling into deep sleep mode. The device will be woken up when the specified period has elapsed.

The action Snooze Notification on Statusbar asks the system to hide a notification for a defined amount of time.
The flow must be executed by a trigger Notification on Statusbar Displayed or the action after a condition Notification on Statusbar Displayed otherwise Automagic has no possibility to access the notification.
Examples:
- Hide a notification for a missed call for one hour.

The action Sound plays the selected sound.
Examples:
- Beep every 5 minutes when Gleeo Time Tracker is recording.
- Play an additional alert when an SMS is received.
Possible settings:
- Built-in sound: to select a built-in notification, alarm or ringtone
- File: to select an arbitrary audio file to play
Possible settings:
- Transient: Automagic requests temporary audio focus, other apps usually pause playback temporarily (depends on app)
- Transient may duck: Automagic requests temporary audio focus, other apps either temporarily pause playback or temporarily lower the volume (depends on app)
- Normal: Automagic requests the normal audio focus, other apps usually pause/stop playback (depends on app)

The action Speech Output uses the default text to speech engine installed to read the defined text.
Examples:
- Read out the incoming SMS.
- Read the current time when you press a shortcut.
Examples:
- use
{triggertime,
to read the timedateformat, HH:mm:ss}
Possible settings:
- Transient: Automagic requests temporary audio focus, other apps usually pause playback temporarily (depends on app)
- Transient may duck: Automagic requests temporary audio focus, other apps either temporarily pause playback or temporarily lower the volume (depends on app)
- Normal: Automagic requests the normal audio focus, other apps usually pause/stop playback (depends on app)

The action Start Activity starts an activity using the specified intent. Please also see the documentation of the Android Intent class.
Tip: Some activities require special permissions to be launched. Check the log after testing the action when an activity fails to start.
Examples:
- Start a specific action exposed by another application.
- Start a Skype call:
- Action: android.intent.action.VIEW
- Data URI: skype:echo123
- Dial a number (without calling):
- Action: android.intent.action.DIAL
- Data URI: tel:99
- Starting a mail app with a predefined subject:
- Action: android.intent.action.SEND
- Data MIME Type: text/plain
- Extras: putString("android.intent.extra.SUBJECT", "test")
Intent.FLAG_ACTIVITY_NEW_TASK
is always added to the intent.Additionally to the regular built in functions of Automagic also the following functions are available to add the extras to the intent:
putString(key, value)
putBoolean(key, value)
putFloat(key, value)
putDouble(key, value)
putByte(key, value)
putShort(key, value)
putChar(key, value)
putInt(key, value)
putLong(key, value)
putUri(key, value)
putBooleanArray(key, value)
putByteArray(key, value)
putIntArray(key, value)
putIntegerArrayList(key, value)
putLongArray(key, value)
putFloatArray(key, value)
putDoubleArray(key, value)
putShortArray(key, value)
putCharArray(key, value)
putStringArray(key, value)
putStringArrayList(key, value)
putUriArray(key, value)
putUriArrayList(key, value)
Example:
putString("key1", "Hello");See action Script for a description of the scripting language.
putBoolean("key2", true);
putDouble("key3", 1.23);
putInt("key4", 42);
putInt("key5", a+4*b);
Following functions are supported:
getString(String key)
getChar(String key, String defaultValue)
getBoolean(String key, Boolean defaultValue)
getFloat(String key, Number defaultValue)
getDouble(String key, Number defaultValue)
getByte(String key, Number defaultValue)
getShort(String key, Number defaultValue)
getInt(String key, Number defaultValue)
getLong(String key, Number defaultValue)
getBundle(String key)
getUri(String key)
getBooleanArray(String key)
getByteArray(String key)
getShortArray(String key)
getCharArray(String key)
getIntArray(String key)
getIntegerArrayList(String key)
getLongArray(String key)
getFloatArray(String key)
getDoubleArray(String key)
getStringArray(String key)
getUriArray(String key)
getUriArrayList(String key)
getParcelableAsString(String key)
getParcelableArrayAsString(String key)
getParcelableArrayListAsString(String key)
getParcelable(String key)
See action Script for a description.
result_code
(only if Wait for result is enabled)operation
(only if Wait for result is enabled)action
(only if Wait for result is enabled)data_string
(only if Wait for result is enabled)categories
(only if Wait for result is enabled)scheme
(only if Wait for result is enabled)type
(only if Wait for result is enabled)
The action Start Daydream starts the daydream configured in the Android settings.
Warning: This function is not officially supported by Android and might not work on all devices.
Note: The action requires Android 4.2+.
Examples:
- Start to daydream when a shortcut is clicked.

The action Start Recording Audio starts recording the specified audio source to the defined file. Only one audio file can be captured at a time.
The recording can be stopped manually using the shown statusbar notification or by executing the action Stop Recording Audio.
Warning: Some audio sources are not supported on most devices due to technical or legal reasons.
Examples:
- Start recording the audio of an incoming call.
- Record the audio at night between 1am and 2am.
- Record the audio for 10 minutes when an SMS arrives and send the resulting audio file to your mail account.
Warning: The voice audio sources are not supported on most devices due to technical or legal reasons.
m4a
or mp4
is recommended. Variables are supported.Example:
/mnt/sdcard/audio_
becomes{triggertime, dateformat, yyyy_MM_dd} .m4a /mnt/sdcard/
audio_2011_02_13.m4a

The action Start Recording Screen (Experimental) starts to record the screen as a video to the defined file. Only one recording session can be active at the same time.
The recording can be stopped manually using the shown statusbar notification or by executing the action Stop Recording Screen.
Examples:
- Record the screen for a few seconds when the device was stolen.
mp4
is recommended. Variables are supported.
The action Start Service starts a service using the specified intent. Please also see the documentation of the Android Intent class.
Tip: Some services require special permissions to be launched. Check the log after testing the action when a service fails to start.
Additionally to the regular built in functions of Automagic also the following functions are available to add the extras to the intent:
putString(key, value)
putBoolean(key, value)
putFloat(key, value)
putDouble(key, value)
putByte(key, value)
putShort(key, value)
putChar(key, value)
putInt(key, value)
putLong(key, value)
putUri(key, value)
putBooleanArray(key, value)
putByteArray(key, value)
putIntArray(key, value)
putIntegerArrayList(key, value)
putLongArray(key, value)
putFloatArray(key, value)
putDoubleArray(key, value)
putShortArray(key, value)
putCharArray(key, value)
putStringArray(key, value)
putStringArrayList(key, value)
putUriArray(key, value)
putUriArrayList(key, value)
Example:
putString("key1", "Hello");See action Script for a description of the scripting language.
putBoolean("key2", true);
putDouble("key3", 1.23);
putInt("key4", 42);
putInt("key5", a+4*b);

The action Stop Action Sound stops a currently executing action Sound
See action Script for a description.
sound_position
sound_duration

The action Stop Action Speech Output stops a currently executing action Speech Output

The action Stop Flows stops one or multiple flows specified in the field Flow pattern list as soon as possible. Use an action Set Flow State to disable flows.
Examples:
- Stop a wake-up flow when the device is shaken.
*
and ?
can be used to match similar named flows.Examples:
Test Flow
Test Flow, SMS Flow
*battery save*

The action Stop Recording Audio stops the currently recording audio started with action Start Recording Audio.
Examples:
- Stop recording a call when the call ends.

The action Stop Recording Screen (Experimental) stops a recording that was previously started with action Start Recording Screen.

The action Store Audio Volumes stores the currently set audio volumes in global variables to restore using action Restore Audio Volumes.
Examples:
- Store the audio volumes when a meeting begins, set all volumes to zero and restore the previously volumes when the meeting ends.
See action Script for a description.

The action Take Picture takes a picture using the built-in camera app or directly in the background without showing a user interface/preview (Android 4+)
Examples:
- Take a picture once an hour and upload the image to Dropbox.
See action Script for a description.
picture_path

The action Take Screenshot (Experimental) creates a screenshot of the currently displayed screen.
Tip: Action Execute Root Command: screencap -p image.png can be used on many rooted devices to take a screenshot on older versions of Android.
Note: Android delivers the screen content compressed to Automagic, the quality of the image is not always optimal. Some devices only allow to take screenshots with a low resolution.
Note: Views that are marked as secure by the displaying app can not be recorded.
Note: The display has to be turned on to take a screenshot.
Examples:
- Create a screenshot and send the image as an attachment as an EMail when a special SMS is received.
See action Script for a description.
operation
output_path

The action Turn Screen On turns the screen on for a few seconds.
Examples:
- Turn the screen on when an SMS arrives.
Note: Some devices ignore this setting and always use the bright mode.
Note: Some devices ignore this setting and use a longer duration.
Note: Some devices ignore this setting.

The action Turn Screen On (Android Wear) turns the screen on for a few seconds.
Examples:
- Turn the screen on when an SMS arrives.

The action Unzip Files unzips all files and folders contained in the ZIP file to the specified target folder.
Examples:
- Unzip all files in
archive.zip
to directory/mnt/sdcard/xyz/
.

The action Update Media Database (Experimental) checks the specified file or folder to delete not existing files from the media database and scans all existing files so the system can add them to the media database when desired.
Note: Please note that scanning of files is a heavy weight process and should be executed only infrequently. It's not recommended to scan the entire external storage.
Examples:
- Scan a new folder after the folder has been copied to ensure that images are shown immediately in the gallery.

The action Update Quick Settings Tile updates a tile that was create with trigger Quick Settings Tile Selected.
Note: Deactivating/activating a flow containing the trigger Quick Settings Tile Selected will update the tile with the information available to the trigger.
Examples:
- Change the icon of a tile when a particular system setting was turned off.

The action Vibrate vibrates with a specific pattern.
Examples:
- Vibrate when WiFi has been disconnected.
- Vibrate when entering a location.
A custom pattern can be composed using a list of numbers in milliseconds to turn the vibrator on/off like 0,500,1000,500 (0ms pause, 500ms vibration, 1000ms pause, 500ms vibration).

The action Vibrate (Android Wear) vibrates with a specific pattern.
Examples:
- Vibrate when WiFi has been disconnected.
- Vibrate when entering a location.
A custom pattern can be composed using a list of numbers in milliseconds to turn the vibrator on/off like 0,500,1000,500 (0ms pause, 500ms vibration, 1000ms pause, 500ms vibration).

The action Voice Search (Experimental) starts the built-in voice search of the system. The speech recognition engine usually requires network access.

The action WiFi Reassociate reconnects to the currently active access point.

The action WiFi Scan starts a scan for available access points.
Note: This is an asynchronous operation and you have to use a trigger WiFi Scan Results Available to process the results.
Examples:
- Start a WiFi scan when you are coming home to faster connect to the access point.

The action Write HTTP Response File (Experimental) writes the specified file as a response to a HTTP request. The flow must be invoked by a trigger HTTP Request to write a response.
Example:
- Fetch a file on your Android device from your desktop PC when connected to the same WiFi network.
Each line should start with the header name and a colon followed by the value to send.
Examples:
User-Agent: my own user agent
SOAPAction: "test"

The action Write HTTP Response Text (Experimental) writes the specified text as a response to a HTTP request. The flow must be invoked by a trigger HTTP Request to write a response.
Example:
- Return a page with device information when a specific page is requested.
Each line should start with the header name and a colon followed by the value to send.
Examples:
User-Agent: my own user agent
SOAPAction: "test"

The action Write to File writes the defined text to the specified file. The action automatically creates the file when the file does not exist yet.
Examples:
- Record your location every 20 minutes to a file.
- Write all incoming SMS to a file.

The action Write to Log appends the defined text to the log file.
Examples:
- Log a variable to debug a flow.

The action Zip Files creates a Zip archive containing the specified files and directories.
Examples:
- Zip all files in directory
/mnt/sdcard/xyz/
to the zip file/mnt/sdcard/backup.zip
.
Examples:
/mnt/sdcard/export*
matches all files with a name starting withexport
in folder/mnt/sdcard
- Source Files
/mnt/sdcard/export*
will store all export* files directly (without parent folder) in the ZIP file - Source Files
/mnt/sdcard/download/
(note the trailing slash) will store all files in folder download directly (without parent folder) in the ZIP file - Source Files
/mnt/sdcard/download
(no trailing slash) will store the folderdownload
and its contained files in the ZIP file