Visual Task Timer supports iOS automation through URL schemes. You can lunch and configure Visual Task Timer by calling a URL from Safari, Workflow, Launch Center Pro and other apps. In addition, Visual Task Timer supports the x-Callback protocol, allowing other apps to request information about Visual Task Timer’s current state.
URLs used to invoke Visual Task Timer follow the structure
where ACTION is a string describing any action to be taken and PARAMETERS is a string of &-separated key=value pairs defining any parameters to be passed to Visual Task Timer. Some elements of this structure may be omitted.
Launching Visual Task Timer from Another App
To launch Visual Task Timer from another app, call the URL
Visual Task Timer support four actions: “reset”, “start”, “pause”, and “play” In some cases, the behavior of these actions can be modified by setting optional “hours” and “minutes” parameters.
To launch Visual Task Timer and reset the countdown clock without starting the timer running, call
To reset the timer for 45 minutes but not start it running, call
To start a new countdown timer running, call
To start a new countdown timer for 1 hour and 30 minutes, call
Note that issuing the “start” or “reset” commands will cancel any timer that is currently running.
To launch Visual Task Timer and pause the countdown if one is running, call
To launch Visual Task Timer and restart a paused countdown, call
For actions that require the caller to specify times, one may either use the “hours” and “minutes” parameters or simply the “minutes” parameter. So, for example, one could set a timer for 1 hour and 45 minutes by either including the parameter string “hours=1&minutes=45” or the string “minutes=105”.
The x-Callback URL protocol provides a way for iOS apps to request information from one another. Under this protocol, a sending app calls a specially formatted URL which launches the receiving app. The receiving app then responds by calling a URL that invokes the calling app and passes along the required data. See x-callback-url.com for a description of the x-callback protocol.
To request that Visual Task Timer report the current time remaining and play/paused state, call
where SOURCEAPP is the name of the calling app, SUCCESSURL is a URL to be called if the information request is successful, and ERRORURL is a URL to be called if the request fails.
If the request is successful, Visual Task Timer will call the URL
where XX is the number of seconds remaining in the countdown, YY is the total number of seconds in the countdown, and ZZ is either “true” or “false” depending on whether or not the timer is paused. XX will be a negative value if the overtime clock is running. It is the calling app’s responsibility to parse the parameter string passed back by Visual Task Timer.
For example, if Sending App with the URL scheme “sendingapp” wished to query the time remaining, it might call the URL
If Visual Task Timer is currently running a 2 hour countdown with 20 minutes remaining, it would would then respond by calling
The callback can be combined with any of the actions described above by simply including the x-callback parameters in the URL’s parameter string. For example, to pause Visual Task Timer and request a callback URL, Sending App might call
Actions will be performed before Visual Task Timer’s state is returned, so, in this example, successfully invoking the “pause” action would ensure that the response URL will include the parameter “paused=true”.
Workflow is one of a number of powerful iOS automation apps that make it easy to make use of URL schemes. The following examples illustrate a couple of the ways Workflow can be used to enhance the functionality of Visual Task Timer.
Visual Task Timer Presets – This workflow presents the user with a menu of agenda items for a hypothetical workshop. Once an item is selected, Workflow launches Visual Task Timer and starts a new countdown timer.
Speak Timer Status – This workflow queries Visual Task Timer for the current countdown timer status and report the result out loud.