How to use Tasker

by: Edgar CervantesJanuary 26, 2016
229
banner-how-to-use-tasker We are Android users, and we are a pampered bunch. Android is such a flexible mobile OS that our Android devices often act as our personal genies granting our daily mobile wishes, making some of our mobile dreams come true. And, as powerful as OEM-provided genies already are, a task control and task automation app such as Tasker only multiplies their power severalfold. Most people describe Tasker as a task control and task automation app. But, I see more than that. It's an Android programming app for complete noobs like me and for advanced users with experience in Android programming. But instead of scaring you with lines of code, Tasker lets you use a friendly interface, which, at its fundamental level, lets you create mini Android apps that do your bidding. To learn how to use Tasker exhaustively is beyond the scope of this post. Instead, in this post, you'll learn the basics of using Tasker to program your Android phone or tablet to do things that you want it to do according to rules that you specify. (Looking for a video tutorial? Jump right ahead to our video guide at the end of this post.)

Tasker terms

First, let's come to terms with... the terms in Tasker. Many of the concepts may be new to you, and they can be a bit overwhelming, especially to neophytes. But, once you get the logic of Tasker, you'll find that it's a truly powerful app even for programming noobs.
  • Action -- The basic element of Tasker. It refers to phone or tablet functions and features that perform something or brings the phone to a certain state. Tasker supports more than 200 actions grouped into 21 categories.
  • Task -- A group of actions. Usually linked to a trigger or "context", but can also be a free-floating, standalone task executed manually. A task can be run within another task. You can clone, export, import, and lock tasks.
  • Context -- Situations or conditions which, when true, trigger the execution of the task(s) associated with it.
  • Profile -- Some sort of "container" or "package" for context(s) and linked task(s). You can define several contexts for a single profile, and all those conditions must be true for the linked tasks to run.
  • Variable -- A name for an unknown value that can change over time, like the battery level or the date.
  • Scene -- A custom-made user interface. You can create your own layout of buttons, menus, popups, and other UI elements.
  • Project -- A group of profiles, tasks, scenes, and variables. Each project has its own tab (at the bottom of the main screen) with a user-defined project name. You can also export or import projects. You can even export a custom project as a standalone Android app (APK): just tap on the project name/icon, select Export, and choose "As App."

Figuring out Tasker's UI

20130430_154245

Tabs and modes

Although I find Tasker's features and overall user interface somewhat complex and definitely intimidating to a casual user or a newcomer to Android, the tabs on the main screen are rather self-explanatory. Freshly installed, Tasker's interface shows three tabs by default -- Profiles, Tasks, and Scenes. The default interface is set up for newbies and beginners (i.e., Beginner Mode). This default UI looks a bit different from non-beginner mode. For instance, in Beginner Mode, you can find three buttons at the bottom row of all tabs: Search, Add, and Help. When Beginner Mode is disabled, these three buttons are replaced by the default project tab (represented by a Home icon) and the Add button, plus at the top row of tabs you get a fourth tab named Vars (i.e., for variables). how-to-use-tasker-ss-001 Easily switch to "advanced" mode by unticking "Beginner Mode" on the UI tab on Tasker's Preferences page. Tapping on a main tab's name (except the Vars tab) on the main screen opens a menu with buttons for importing files and for setting the sort order for that tab.

Project Tabs

In "advanced" mode (i.e., with Beginner Mode disabled), tapping the default project tab opens a menu with buttons labeled Add, Import, Rename, Set Icon, and Lock/Unlock. The Add button lets you create a new project, which will have its own tab. The Import and Export buttons, of course, let you share your Tasker project files to others, or use files created by others. You can also assign custom icons to your project tabs. 20130430_154343 By the way, it's easy to protect your projects by setting a lock code; when prompted, just type your lock code in order to view and edit a project.

Main menu

20130430_154412 Tasker's main menu offers commands and options that help you use and manage how the app works. Access the main menu via the capacitive Menu key or the virtual Menu button (three dots icon) at the upper-right corner of the screen. You'll find these on the menu:
  • Browse Examples -- redirects you to a list of pre-made example profiles, which you can download and import to Tasker.
  • Data -- for clearing, backing up, or restoring backed up data.
  • Info -- contains information about the app and how to use it.
  • Preferences -- opens the Preferences page (more about this in the next section).
  • Enable/Disable Tasker -- enables or disables Tasker.
  • Search Tasker -- search data or feature within the app; not available in Beginner Mode.
  • Exit -- closes the app.
  • Run An Action -- performs a single action (e.g. maximizing screen brightness)
  • Run Log -- records events and procedures done through the app.
  • Developer Options -- advanced options for devs; not available in Beginner Mode.

Preferences

Tasker's preferences and options reflect the flexibility of the app. To some people, this can be truly discomfiting, but to those with elevated understanding, this actually shows what Tasker and Android are all about -- freedom and flexibility. Beside many of the options on the Preferences screen, you'll see big question marks. These can offer relief if you start to scratch your head about what an option might be for. However, some of the help tips are clouded in developer or programmer language, and an idiot like me may need some time to completely digest the info. 20130430_154454 Tasker's configuration options are grouped into four tabs. You can customize the app's user interface via the UI tab. On the Monitor tab, you can set personal preferences for the app's monitoring behavior when the display is either off or on. On the Action tab, you can set values for camera delay, task execution priority for widgets or shortcuts, displaying warnings and/or errors, and maximum number of queued tasks. On the Misc tab, you can specify how long to keep backups, whether to allow other apps to run tasks, and debugging options. In the next section, you'll continue to learn more about how to create a task and assign one or several actions to a task.

Actions and tasks

Tasks -- in case you haven't noticed in the app's name -- are the heart and soul of Tasker. But, a Tasker task is nothing without actions, which are stuff that your phone or tablet does. Tasks and actions are inseparable. A "task" in Tasker is a collection of actions performed one after another when the said task is invoked. When you lump several actions into one task, those actions become meaningful and relevant to you as a user because the independent actions appear to serve a common goal (i.e., the task). It may be easier to think of a task as a goal or an end result that can be achieved by one or several actions. 20130430_154543 It may also help to think of a task as a sequenced list of things to do. For instance, you may want to set up a task for sending reminder emails at certain hours of the day. The task for this might include actions for connecting to Wi-Fi or enabling mobile data, composing an email message, sending an email message, and then disconnecting from the network.

Named and unnamed tasks

When you create a task, you usually provide a name for it. For instance, I can create a task for saving battery power. The task might consist of actions to turn off Wi-Fi, GPS, mobile data, Bluetooth, and NFC. Then, I can also make another task for use when I'm outdoors -- and aptly name it "Outdoors"; the set might consist of actions like enabling auto brightness, enabling vibration feedback, and setting the ring volume to max. Naming a task makes the task reusable; you can call up the same task in many different profiles and contexts. At times, though, you don't need to provide a name for a task, especially for one-action tasks created when you create a profile, shortcut, or widget. 20130430_154632

Here's an example

To illustrate the concept of tasks and actions more clearly, let's try actually creating a task. This example task, which we'll name "Batt Save", will do the following:
  • Disable auto brightness and autosync
  • Set brightness level to low
  • Set display timeout to a low value
  • Disable Wi-Fi, mobile data, haptic feedback, GPS, and Bluetooth
Here's how to set up all those actions in one "Batt Save" task:
  1. Create a new task, as follows:
    1. Open the Tasks tab.
    2. Tap the Add New Task button at the lower-right corner of the screen.
    3. Type a name for the new task. In this example, use "Batt Save."
    4. Tap the checkmark button to save the new task. You'll see the Task Edit screen.
  2. Disable auto brightness, as follows:
    1. On the Task Edit screen, tap the Add New Action button (plus icon) at bottom of screen.
    2. Tap on Display > Auto Brightness. Change the value of Set to "Off". Tap the Back button to return to previous screen.
  3. Set brightness level to a low value (e.g., 25, or even 0), as follows:
    1. On the Task Edit screen, tap the Add New Action button (plus icon) at bottom of screen.
    2. Tap on Display > Display Brightness. Change the value of Level to "0". Tap the Back button to return to previous screen.
  4. Set display timeout to a low value (15 seconds, maybe), as follows:
    1. On the Task Edit screen, tap the Add New Action button (plus icon) at bottom of screen.
    2. Tap on Display > Display Timeout. Change the value of Secs to "15". Tap the Back button to return to previous screen.
  5. Turn off or disable various battery-eating services, as follows:
    1. On the Task Edit screen, tap the Add New Action button (plus icon) at bottom of screen.
    2. Change the value of Set to "Off" in the locations listed below. Remember to tap the Back button to save the action and return to the action list.
      1. Net > WiFi
      2. Net > Mobile Data
      3. Audio > Haptic Feedback
      4. Misc > GPS
      5. Net > Bluetooth
      6. Net > Auto-Sync
You now have a task named "Batt Save". You can run the task manually if you want. Or, better yet, you can link it to a context/trigger (more about this later). You can even share this task to other people in the form of an APK file that can be installed on other Android devices. Just export the task as APK file (see next section about exporting tasks).

Importing/exporting tasks

To import a saved task into Tasker, just tap the Tasks tab. Then, select Import from the menu, browse for the XML file, and tap to import it. 20130430_154733 To export a task, long-tap on the task name. Tap the Menu button, then select Export. You can export a task as an APK file or as an XML file.

How to delete a task or action

To delete a task, long-tap on a task name on the tasks list, then tap the Trash icon. To delete an action, open the task containing the action, tap-hold on the action's icon at the right side of the action name, then drag-drop the action name on the Trash icon at the bottom of the screen.

Rearranging actions in a task

To move an action up or down a list of actions, just tap-hold on the action's icon at the rightmost side of the action name, and drag-drop the action name to its new location.

Running a task manually

Open the Tasks tab. Tap on the task to be run; the Task Edit screen opens. Tap the Play button at the bottom of the screen.

What about shortcuts and widgets?

Tasks can also be manually run through shortcuts or widgets. Just place a Tasker Task widget, or Tasker Task shortcut, or even a Task Timer widget (which has a countdown timer) on your homescreen. Then, select the task to associate with it. 20130430_163438 Once the widget or shortcut is in place, you can run its associated task by tapping on the icon just like you'd normally do with any app. Now that you know how to set up tasks, you can make them execute automatically by associating them with triggers (known in Tasker as "contexts"). You'll find out how to do that in the next section.

Associating tasks with context

Actions that are grouped in tasks won't do much unless they are actually run -- either automatically or manually. As I've mentioned in the previous section, you can run tasks manually. Although it's already convenient to manually execute several actions all at once, it's more convenient to run them in some kind of automatic way. Here's where Tasker actually shines -- it can automate task execution according to rules, conditions, or triggers (also known as "contexts" in Tasker). You can think of Tasker contexts as conditions or situations, which, when true, will instruct the app to run the associated task(s). You can also think of contexts as the "if" part of a conditional statement, while the tasks are the "then" part. 20130430_160136 Tasker provides numerous contexts, grouped into 6 categories:
  1. Application -- Triggers task execution when an app is launched or run.
  2. Day -- Runs tasks depending on day(s) that you specify.
  3. Event -- Tasks run when certain device "events" happen on your device. This category has the following subcategories: Date/Time, Display, File, Hardware, Phone, Power, Sensor, System, Tasker, UI, Variables, 3rd Party
  4. Location -- Runs tasks when the device enters a user-defined geographical location.
  5. State -- Runs tasks when the device enters a certain state or condition (e.g., Bluetooth status is off, Wi-Fi is connected, etc.). This category has the following subcategories: App, Display, Hardware, Net, Phone, Plugin, Power, Sensor, Tasker, Variables.
  6. Time -- Runs tasks according to the time of day that you specify. A beginning and ending time can be specified. Task execution can also be repeated every n minutes or hours after first execution.
Let's go back to our "Batt Save" task. You can set this task to run, for instance, every time your battery level goes below 50%. Here's how you might set all that up:
  1. Open the Profiles tab in Tasker.
  2. Tap the Add New Profile button (plus icon) at the bottom-right of the screen.
  3. Select State > Power > Battery Level. This will be the context or trigger under this profile.
  4. On the edit page, drag the To slider to "50". Keep the From slider at "0". This setting means "When the battery level is between 0 and 50."
  5. Tap the Back button to return to the previous screen. From the popup list that appears, tap on "Batt Save" to select it and associate it with the context.
  6. You'll now see the new profile on the Profiles tab. To its right is an On/Off switch. If the switch is on, Tasker will perform the associated tasks when the trigger is activated or when the context or conditions are met.
  7. To change the default profile name, long-tap on the profile name and tap the Name button (represented by the uppercase letter A) at the top of the screen. Type the name on the text field, and tap the checkmark button to save it.
  8. Below the new profile's name, you'll see the context name and a green arrow pointing towards the task associated with it. You can also rename the context name, if you want. Just long-tap on the context name, select Name, type the name on the text field, and save it by tapping the checkmark button.
Now, each time your device reaches 50 percent of its battery power or lower, Tasker will execute the actions listed in the Batt Save task that you defined. In the next section, I'll talk a bit about creating scenes in Tasker. These are custom user interfaces that can help you design your own mini apps using Tasker. I'll also discuss variables very briefly. Both topics deserve their own separate tutorials, but I'll tell you about them broadly in the next section -- so, go ahead and go to the next page.

Scenes

Scene creation is actually an advanced topic that deserves its own separate tutorial, but I'll briefly talk about it here for the sake of completeness. how-to-use-tasker-ss-002 A scene is a custom user interface that you build from scratch. It can use elements that you usually find on UIs, including such elements as buttons, doodles, images, maps, menus, shapes (e.g., ovals, rectangles), sliders, text boxes, text input fields, and web viewer boxes. Each element is customizable. For demonstration purposes, I'll show you how to create a simple popup box that displays an SMS message when it arrives.
  1. Open the Scenes tab in Tasker.
  2. Add/Create a new scene. Provide a name for it. In this example, I'll use "PopSMS" as scene name.
  3. You'll see the Scene Edit screen in Preview Mode, with a dotted box in the middle. The dotted box is your scene display area. You can resize this, if you want. You can also change the background color of the display area, if you want. For now, let's just stick to the default.
  4. To be able to add UI elements to the display area, you need to switch to Editing Mode by tapping the magnifier with an X at the lower-right corner. Then, hold down on the display area to bring up the UI elements menu.
  5. Tap on Text to add a text box to the display area. Keep its default name. In this text box we'll display the text body. So, as value for Text, we specify a variable, specifically the variable for the body of an SMS message. Tap the tags icon at the right of the Text label, scroll down, and tap "Text Body." You should find %SMSRB as the value for Text.
  6. Tap the virtual Back button to return to the Scene Edit screen.
  7. We'd like to show the name of the sender, too. So, let's add another text box to display the sender's name. Just follow the same procedure for adding a text box to display the SMS text body, but for Text value, choose "Text From Name." You should see the variable %SMSRN as the value for Text.
  8. Again, tap the virtual Back button to return to the Scene Edit screen.
  9. Finally, we'd like to add a button to close the popup box after the message is read:
    1. Select "Button" from the list of UI elements. Just keep the button's default name.
    2. For Label, you can use "OK," "Done," or "Close."
    3. Then, specify the action to perform when this button is tapped. For that, switch to the Tap tab. Then, tap Add > Scene > Destroy Scene. This action, of course, does what it says -- it will destroy the scene that you specify in the Name field. Choose "PopSMS" as the scene to destroy. It should appear in the Name field.
  10. Tap the virtual Back button until you're back at the main Tasker screen. You should be able to find PopSMS on the Scenes tab.
how-to-use-tasker-ss-003

Displaying a scene

So far, I've only shown you the scene creation part. That scene will be useless unless it is shown or displayed. So, we need to create a task for displaying the said scene. Then, the task needs to be linked to a context; in this case, the context will be an event, specifically, the event where the phone receives a text message.
  1. Open the Tasks tab. Create a new task by tapping the Add button (plus sign) at the lower-right corner. Name the task anything you want. In this example, I name it "ShowText." Tap the checkmark to save the name.
  2. On the Task Edit screen, tap the Add Action button (plus sign). Then, tap Scene > Show Scene.
  3. On the Action Edit screen, tap the magnifier icon at the right side of Name and select "PopSMS," which is the name of the scene that we created earlier.
  4. From the drop-down list under Display As, select " Dialog, Dim Behind Heavy." This will cause the scene to be shown as a dialog box, with everything behind it dimmed heavily.
  5. Tap the virtual Back button until you reach Tasker's main screen. You should be able to see "ShowText" listed on the Tasks tab. The task now needs to be linked to a context in order to execute it.
  6. Open the Profiles tab. Create a new profile and context by tapping the plus button at the lower-right of the screen. Select Event > Phone > Received Text. Just leave the default event settings as they are for now.
  7. Tap the virtual Back button to return to the main screen. You'll be shown a popup list of tasks to link to the new context and profile. Select "ShowText" from the list.
  8. Make sure that the newly created profile is enabled so that Tasker can execute the associated task when triggered.
The example above, of course, is a very rough one. But, if you have the time and the patience, you can refine it further. Tasker lets you tweak a lot of the details.

Using variables

If you've ever done some programming before, you'll be familiar with the concept of variables. They're close kin to variables that you keep hearing about in algebra class. To define it simply, a variable is a name for a value that changes over time. Just like scene creation, Tasker variables are also complex topics that deserve their own separate tutorials. I'll talk briefly about them, though, just to let you know what immense power you'll get if you just patiently climb the steep hill of learning how to use Tasker. 20130430_160518 In the previous section about scene creation, you encountered two variables represented by %SMSRB and %SMSRN (for SMS Text Body and SMS Sender Name, respectively). These are examples of built-in variables that you can use in Tasker. You cannot set, create, or define these kinds of variables. (That's why they're called "built-in.") Tasker variables always begins with the percent (%) symbol. Variables in all uppercase are built-in variables. They are usually derived from system information, device states, or events. Some common examples are %TIME (current time), %DATE (current date), %BATT (current battery level), and %WIFI (whether Wi-Fi is enabled or not). Aside from built-in variables, there are two other variable types: local and global. Both are user-defined and user-created. The main difference between them is that local variables can be used only within the task or scene in which they are created, defined, or used; global variables are accessible to all of Tasker. Another main difference is in capitalization: local variables use all lowercase but global variables have at least one uppercase letter in its name. You're nearly done with this general tutorial about Tasker. If you want to learn more about how to use Tasker, or review in a visual way what I've discussed so far, you can watch our video tutorial in the next section.

Some things to keep in mind

Google has made some significant changes to Android, pushing some Tasker features out the door. These are not very common tasks and actions, though. I have been using the same Tasker projects for years and none have failed me yet. Have any of yours let you down?

Some awesome Tasker projects to try out

How about that video tutorial?!

Need some visual simulation? Learn how to use Tasker with the help of our video walkthrough:

Conclusion

Tasker is a powerful, complex, and flexible automation and programming app, but it can be intimidating to some and may not be for the faint of heart. It also has a steep learning curve -- I myself can attest to it -- but it's worth the trouble. It does take some time to become familiar with, much more to be proficient with, but the time will definitely be worth it. It's a small price to pay for the power, flexibility, and control that Tasker allows you to wield over your Android device. Do you use Tasker? What do you use it for? Or, are you new to Tasker? How's your experience with it so far? Share your Tasker experiences with us. Sound off in the comments.
  • Excellent!

  • Joe Morrison

    Tasker is the first app I install on any android device. You can easily automate anything on your phone. Here are a couple of my tasks.

    -nightly Rsync of SD card to my server if the device is connected to my home WiFi and plugged in.

    -auto enable GPS anytime an app that requires GPS is launched.

    -disable screen lock, change volume, enable airplane mode, connect to wifi, change Google voice forwarding destination, register SIP account to my PBX… via task called from NFC tag

    -launch Spotify, disable screen lock, launch wave control, when headphones are detected.

    The list goes on and on… this app is totally worth it.

    • Stephen Ting

      how to Rsync of SD Card?

  • Kevin

    Excellent breakdown, you explained each component of Tasker beautifully. Hopefully it will encourage more people to give it a try. Well done!

  • Mr_Je11yman

    Tasker is intimidating, but you warm up to it really fast, so I encourage everyone to try it. I am just a basic Tasker user (so far) and I have already set it to do the following:

    Turn off bluetooth, disable screen lock, enable wi-fi when I pull into my driveway

    Silence ALL volume on my phone the minute I get to church on Sunday, and restore all volume levels after I leave

    Since I leave my phone on all the time I have my volumes reduced to 20% at night and no notifications, so if I get an emergency call at least it won’t shock me awake.

    Reminds me to take the trash out on trash day

  • Sudeepto Dutta

    This app separates Android from all the OS …

    Really worth paying for this one

  • Nacos

    Hat’s off to you, Elmer for writing this article. Advanced and beginners alike, should give Tasker much more attention than it currently gets. It truly deserves it! Android + Tasker is a very, very, very powerful combination and once the basics are covered, the sky is the limit. I remember once reading a comment in Google Play from somebody complaining that Tasker was too expensive at $6.99. When one truly reveals its potential, this amount apears ridiculously trivial – in parallel software universes Tasker could easily be compared to Adobe Photoshop, which happens to cost just a “little” more than merely $6.99.

  • Guy De Vos

    Tasker is by far the most useful app I’ve ever purchased. This app alone makes the whole iOS vs Android debate seem ridiculous. Android wins, no matter what anybody says.

    • Mandy Jhons

      Agree with your assertions. Its a piece of crap for me in new year 2015 too.

  • Very nice guide, Tasker can be a little complicated for a lot of users. Thanks for writing this.

  • brian robinson

    i had tasker for quite a while got it on sale.

    never used it though i knew it was good purchase at the time,

    i am absolutely gobsmacked this this thing is the bomb duffer.
    just wish there was more tutorials like this thanx.

  • Leonid Joseph

    Will it allow me to auto record all phone calls in my Samsung Galaxy chat. No auto call recording software works with the Chat. And it is legally ok to record here. Please reply fast. Thanks in advance.

  • Philip DiDomenico

    Excellent job. This is the clearest explanation of Tasker I’ve seen.

  • kyoshi

    Help! How can I use Tasker to allow bluetooth voice dialing when screen is locked? (kenwood receiver, Samsung S4)

    • Mekhs

      Refer its FAQ on Google play store. Like its also for star sports live over there. Check that and enjoy.

  • Siddharth

    The science way to say this look they have given us a PCB special

  • Kal Goop

    Can anyone tell help me on adding this task on Tasker?
    I want that Tasker checks for any alarms in my phone and according to the time of alarm it would set silent mode from one hour before alarm.
    After the alarm rings, profile automatically gets shifted to general.
    This will help me sleep without interruptions.
    Thank you in advance.

  • sri charan

    Tasker is extremely powerful but not very user-friendly….
    AutomateIt is not so robust but is very user-friendly…..
    MacroDroid is somewhere between….Its powerful and userfriendly….

    If tasker is too complex for anyone I advise you to get MacroDroid…..