Tasker: Tour
Tasks
A task is a set of actions, usually with a name.
Here's a simple task with two actions. It first makes
an announcement and then takes a photo.
The icon
in the bottom
right indicates an Execute Task, which runs each of it's
actions in sequence. It could also be a
Menu Task (
) which shows
a dialog to allow the user to pick one of the actions.
Although this one is a simple task, they can become quite long and complicated and so
can be exported and imported for backup and sharing purposes.
Actions
There are currently more than 180 built-in actions available in 14 categories.
- Alert: Flash, Notify LED/Sound/Vibrate, Cancel Notification, Popup Timed/WithTaskIcons/WithTaskNames, Torch, Vibrate, Vibrate Pattern
- App: Calendar Insert, Go Home, Kill App, Load App, Open Map (/StreetView/Navigate)
- Audio: Alarm/Call/DTMF/Media/Notification/Ringer/System Volume, Haptic Feedback Toggle, Microphone Mute, Notification Pulse, Notification/Ringer Vibrate, Silent Mode, Speakerphone, Sound Effects toggle
- Dialog: 28 System Settings dialogs
- Display: Auto-Brightness, Close System Dialogs, Keyguard, Keyguard Pattern, Display Brightness, Display Off Timeout, Display Rotation, Input Method Select, Set Wallpaper, Stay On, Soft Keyboard (show), Status Bar (expand/collapse)
- Encrypt (not in market version): File/Directory Encrypt/Decrypt,Enter/Clear Passphrase
- File: Browse Files, Directory Create/Delete/Move, File Copy/Delete/Move/Open, Write To File, Read Line, Read Paragraph, Zip/Unzip File
- Media: Android Media Player Control, Music File/Dir, Play/Forward/Back/Stop, Photo/Series/TimeSeries, Record Audio, Record Audio Stop, Ringtone, Scan Card
- Misc: (Broadcast) Action Intent, Component Intent, Get Location, GPS Set, Run (ASE) Script, Say, Say To File, Shut Up, Search For, Set Clipboard, Set Timezone
- Network: Airplane Mode, Autosync, Bluetooth, Bluetooth ID, Compose Email, Browse URL, HTTP GET, HTTP POST, Mobile Data (on/off), USB Tether, WiFi (set/toggle), Wifi Disconnect/Reassociate/Reconnect, Wifi Sleep, Wifi Tether, Wimax (set/toggle)
- Phone: Call, Call Log, Call Block/Divert/Revert, Compose MMS/SMS (Templated), Contacts, End Call, Radio, Send SMS, Send Data SMS, Silence Ringer, Take Call
- Tasker: Change Icon Set, If, End If, Goto Action, Perform Task, Profile Toggle, Query Action, Set Widget Icon, Set Widget Label, Stop, Wait, Wait Until
- Variables: Set/Clear/Inc/Dec/Randomize/Split/Join/List
- 3rd Party: Android Notifier, BeyondPod, JuiceDefender, NewsRob, SleepBot, TeslaLED, WidgetLocker
There is also a Plugins category for any Locale-compatible action plugins that are installed on the device.
Please note that not all actions are supported on all devices.
Most actions have parameters. Here's the configuration screen (Action Edit) for the Take Photo action in the Task Above.
Notice the If row at the bottom ? That's present for every action and lets you specify
a condition without which the action won't happen.
Variables
Variables are an important feature of Tasker. A variable is just a name for an unknown value e.g. %BATT which holds the current
battery level.
A variable name can be included in any textual action parameter, and when the action executes it's value is substituted.
Here's an example of using the Current Battery Level variable in a Popup action.
The image on the left is the Popup Task Icons action,
which takes some text and a couple of other tasks
as parameters. In the text, the variable %BATT is used
and you can see in the right hand image it's replaced
with the actual battery level when the Task runs.
Another use for variables is in conditionals.
In this example, the Wifi state is toggled, and
then the icon of a home screen widget is set depending on the
value of the built in variable %WIFI.
The final use of variables is for looping.
This example vibrates the device briefly 10 times.
%COUNT is a user variable, which can be
created with any name you like.
Note the condition on the last action,
which says only to go back and vibrate again
if %COUNT is less than 10.
Even complicated mathematical expressions are possible e.g. If %TIMES > %LASTTIME + %PERIOD * 2
(%TIMES is the current time in seconds).
Built-In Variables
Available built-in variables are:
Airplane Mode Status, Battery Level, Bluetooth Status, Brightness, Called Name,Number,Duration,Time,Date (Out), Clipboard Contents, Date, Display Timeout, Day of Month/Week,
Free Memory, GPS Status, HTTP Response/Data, Keyguard Status, Email From/Cc/Subject/Date/Time, Light Level, Location/Accuracy/Altitude/Provider/Speed/Fix Time, Music Track, Profiles Active, Profiles Enabled, Screen State, Text Sender Address/Name/Body/Date/Subject/Time, Cell ID/Signal Strength/ServiceState, Silent Mode, Task Time in Queue,Last Caller Name/Number/Date/Time (In), Last Application, Last Photo, Muted, Notification Title, Phone Number, Roaming, Speakerphone, Telephone Network Operator, Time, Time Seconds, Uptime Seconds, Speech,
Volume Level Alarm/Call/DTMF/Media/Notification/Ringer/System, WiFi Status, Wimax Status, Window Label
The Userguide has more information on variables.
Contexts
Tasks can be carried out based on any combination of:
- The application which is currently running
- The time (
) e.g. at 2:30, after 10pm, every 20 minutes until 3am
- The date (
) e.g. Sundays and Mondays, 30th of every month, the 10th of June or December
- The geographical location (
) e.g. at home, in the office
- The state (
) of something e.g. whether the device is docked
- When an event occurs (
)
- e.g. an SMS arrived, battery is full, headphones connected
- the device is moved in a gesture e.g. it's tilted 90 degrees and back
- a notification is clicked.
- When a Widget or Shortcut is clicked, or a Timer Widget expires on the Android home screen
Here are the application, time, day location and
event (code select/event edit)
context configuration screens:
States
State Contexts represent a continuous hardware or software state. The following are available:
Airplane Mode, Bluetooth Connected, Calendar Entry, Docked (Any/Desk/Car), Headset Plugged (Any/Mic/No Mic), Incoming Call, Keyboard Out, Light Level, Media Button, Missed Call, Mobile Network (Any/2G/3G), Orientation (Face Up etc), Power Any/AC/USB, Proximity Sensor, Signal Strength, Unread Text, Variable Value, Wifi Network, Wifi Near
Events
For the Event Context, around 50 events are currently available, divided into 10 categories:
- Date/Time: Alarm Clock, Alarm Done, Date Set, Time/Date Set, Timezone Set
- Display: Screen Off/On
- File: File Closed/Deleted/Modified/Moved/Opened/Attributes Changed
- Hardware: Camera Button, Search Button Long-Press, Card Mounted/Removed/Unmounted
- Misc: Button Gadget Clicked, Gesture, New Window, Notification, Notification Clicked, User Present, Variable Cleared/Set
- Phone: Missed Call, Phone Idle/Offhook/Ringing, Received Text, SMS Send Success/Failure
- Power: Battery Changed/Full/Low/Overheating
- System: Device Boot, Device Shutdown, Device Storage Low, Locale Changed, New/Removed/Updated Package, Wallpaper Changed
- Variables: Variable Cleared/Set
- 3rd Party: Email Received (K9), Kaloer Clock, OpenWatch, Screebl, Widget Locker (Locked,Unlocked,Hidden)
Some events have parameters e.g. you can specify the number of the SMS sender to send a response to so as to be able to react to different numbers in different ways.
For some events you can also control the priority which
Tasker receives them at, and whether other applications
should receive them afterwards.
In this example, the Camera button is blocked from being
sent to other applications.
Gestures
A gesture is a particular movement of the device through space e.g. jab it forward, tilt to the left and back.
Tasker allows you to record any gesture you like and link it to any Task just like the system-generated events
described above.
Unlike some implementations, you don't need to do anything to initiate capture of a gesture, Tasker will automatically
enable monitoring for gestures in the contexts in which you define it.
Permanent Notifications
The action Notify can permanently place an item
in the system notifications pulldown.
These items are then always available, whichever application
you are in.
When a Tasker notification is clicked, it generates a
Notification Clicked event which you can then use
to do anything you like. In the examples above, to show
a brightness slider or a settings menu.
Clickable Widgets
A widget is an icon on the home screen. Tasker let's you configure the text,
icon and task that is run (when the widget is tapped) for as many widgets as
you want. That could be
as simple as toggling bluetooth, or as complex as the below example with
multi-layer menus of tasks and simple actions.
There are 22 icon sets available for download with
over 200 icons each. You can also use normal application
icons e.g. to replace home screen apps with Tasker
widgets.
There's also a selection of built-in icons.
Here's a home screen populated with Tasker widgets.
At the top are two rows of widgets which just load the
corresponding application. The image on the left shows
the Task behind the Metal Detector icon.
The Settings icon calls up the Menu Task on
the left. The top Dialogs item calls up the
submenu on the right. Notice you can go back to the
main Settings menu from the submenu. Also that you can use an image
file as the background for the menu.
The Sound icon calls up a menu task with
various sound control options.
The Games widget calls up the list of games on
the left. From the right image you can see that each
image has a Load App action behind it.
You could categorize all your applications like this
to avoid home screen clutter.
The Run icon is a task that simply runs
Get Action, which queries for an action
and then runs it. This one is very useful from the
home screen because it gives quick access to any
of Tasker's functions. In these examples it can
be used to quickly change screen brightness or
an icon set.
Tasker also has actions which change the icon and/or label or existing icons.
That lets you, for instance, show status by changing an icon in the home screen
when an event occurs.
Finally, since Tasker also has a Set Wallpaper
action, you can change the whole look of the home screen
with a single Task.
The Task on the left changes the desktop to the
image on the right. You could use this to e.g.
change your home screen on different days of the week.
Timer Widgets
A Timer Widget has two major differences to a normal
widget:
- it's task only runs when a countdown timer has
expired, not when it's clicked on.
- it looks different on the home screen
On the left is the configuration for a task called Picture which is being used here with a countdown timer widget. On the right the timer is show on the home screen (at the top left of the screen).
Timer widgets can be paused/restarted/reset by clicking on the time remaining, or reconfigured by clicking on the stopwatch icon.
The Picture task starts when the timer reaches zero. It starts playing some music, takes the photo, stops the music then shows the popup on the left.
Clickable Shortcuts
A shortcut is just like a widget, except the configuration possibilities are more limited.
On the other hand, a shortcut integrates better in the home screen and can be used in some places that
Widgets cannot, like folders.
Profiles
Profiles are configured in the Profile List screen. There are three
different views:
- Flat: all the profiles in a single list.
- Context Tabs: lists profiles by context
type, since a single list might become cumbersome if you
have a lot of profiles.
- User Tabs: fully user-configurable, allowing to categorization and arrangement
of the profiles however you like.