Actions Introduction
Actions are things which occur in the DemoPad solution. They are triggered by events, for example pressing or releasing a button within the app, or receiving feedback from a device.
It is possible for many actions to occur when triggered (with optional delays). A list of all the actions which occur for a specific trigger are displayed and altered in the action editor.
For example, to enter some actions which occur when a button is released, either double click the button, or click on the action editor:
Action Types
Actions fall in to one of the following action types, selectable from the drop down list:
Send a command - probably the most common action type, this sends a command to a device
Set a Flag - sets a flag variable to either
ON
,OFF
,TOGGLE
(flip its value) orEXCLUSIVELY ON
(sets the flagON
, and all other flags in the same folderOFF
)Set a Label - sets a label variable to the text entered
Send data to website - performs a HTTP GET request on the specified URL. Nothing is shown on the UI, but the GET request is performed in the background
Launch Web Page / Other App - exits the app, and launches another app, eg to launch a browser & navigate to a specific URL
Jump to a page - causes the specified page to be displayed. Can be a specific page, or the previous page shown
Exit App - causes the app to shut down
Set a number - sets a number variable to the specified value. May cause custom number actions to also fire
Disable device auto lock - prevents the iOS / Android device from going to sleep mode
Enable device auto lock - allows the iOS / Android device to go in to sleep mode
Play a sound - plays a sound file
Disconnect from device - manually disconnects from a specific device
Connect to device - manually connects to a specific device
Screen brightness adjust - adjusts the screen brightness of the iOS / Android device from 0-100%
Display a message dialog - displays some text to the user, with an
OK
button to press
Action Triggers
In order for actions to occur, something must trigger them. Triggers (eg pressing a button) can execute multiple actions, with optional timed delays.
Actions can be triggered in the following situations:
Buttons - when a button is pressed, released, held, double tapped, or swiped - each type of trigger can cause different actions to occur. Also actions can be performed if one button is dragged onto another.
App Start - when the control app first starts, action can be performed
App Resumes - when the app resumes from running in the background on the device
Page Load - when the a page loads, actions can be performed (and these can optionally repeat whilst the page is active)
Device Feedback - when data is received from a device, actions can be performed, depending on the content of the feedback
Number Variable Changes - when a number variable changes, actions can be performed if the number falls within a certain range
Centro-8 / 8M Macro - A Centro 8 / 8M macro consists of one or more actions