Tasker is a powerful app for Android that lets you customize how your phone works and automate tasks. Unfortunately, it’s got a bit of a learning curve. We’re here to show you how to get started and turn your phone into a flashlight in the process.
Tasker is a great tool for generating “tasks,” a series of instructions carried out in certain contexts and in response to certain events. Tasker is available from the Android Market, but it’s slightly cheaper if you buy directly from their site. It has a 7-day free trial, includes free future updates, and you can buy it once and use it on multiple devices.
For the purposes of this article, we’ll walk you through how to create a profile, set a context, and create a task. If your phone has a camera LED, then you can turn your phone into a flashlight/reading lamp by following along. The way it’ll work is that when you’re on your home screen, you can turn on the camera LED by turning your phone face down (via triggering the proximity sensor), and it’ll turn off when you turn it back over.
Once you’ve got Tasker installed, tap its icon to launch it. You’ll see a list of profiles by default. Profiles are set up to have specific contexts, such as when X app is running, at X/Y GPS coordinates, or when Y button is pressed. When these conditions are met, a list of tasks is executed. You can also configure exit tasks, things that are done after the contexts are removed.
You can see I’ve got a few, but yours will be blank. Tap “New” to create a new Profile. Let’s give it a name like “Upside Down LED.”
You’ll see a list pop up. This is where you can choose your context.
Go ahead and tap on “State.” You’ll see a list of categories for different hardware and software aspects for your phone.
Tap on “Proximity Sensor.” You’ll get a pop-up with options.
The normal behavior is that a task will run when the proximity sensor is triggered, i.e. something is in front of it. You can also invert this so that a task runs only when something’s NOT triggering it, but for our purposes, we’ll leave the “Invert” option unchecked. Tap Done. Then, you should see the Task Selection pane come up.
Here, you can choose from any task you’ve created. Yours will be blank, so just tap “New Task.”
Give this task a name. I chose “Led On/off” so if I reference this task in the future for whatever reason, I know exactly what it does. Tap OK.
Next, you’ll see the Task Edit pane. Here, you can create a series of things to do for this particular task. Tap the plus button.
Here, you can select an action category. You can filter the results at the bottom by whether you can settings that can be changed or actions to be carried out. We’ll ignore those for now and just tap “3rd Party.”
Tasker can interface with some other Market apps. Lucky for us, it has a built-in LED lighting system, TeslaLED, so tap on that.
Here you can change the options. We want a Toggle behavior, so choose that from the list and then tap Done. Then tap Done again so you return to the Profile screen.
Now, let’s refine our behavior a bit more. After all, it might be annoying to others to have the camera LED on when you’re talking on the phone. On the Profile screen, tap and on hold on the context (the left block) under your current profile, and you should see a menu pop up.
Here, we can add another context. This time, let’s choose “Application.” Be patient, because it may take a little while to load up all of your apps.
Here, you can choose multiple application that, when active, will allow this toggling behavior to occur. I use Launcher Pro, so I chose that. You may be on the default launcher, so you may want to choose Home, Motorola Home, or whatever the name of the default for your phone is. Conversely, you can also tap the “Not” key and make it so that it does NOT allow the toggling task when in a specific app, but allows it at all other times.
That’s it! Make sure that the “On” button is green on the bottom of the screen, and that the profile is showing a green check mark. If it’s showing a red circle with a slash, that means the profile is disabled.
Alternatively, you can change it so your camera button will toggle the camera LED instead.
To do that, make sure you have two contexts. The first condition should be an Event. Look under Hardware and choose “Button: Camera.” The second condition should be Application. Choose “Not” and select all of the apps that utilize the camera button in some way, like “Camera,” “Camcorder,” “Vignette,” etc. This way, you won’t cause any conflicts. Now, when ever your phone is unlocked, you just have to press the camera button to turn the camera LED on and off.
On my Droid X, I have to hold the button down for a second or two to register the button press, but that’s how it works with the shutter as well. Button events and proximity sensor states must be read while the phone is unlocked, though other tasks (like toggling WiFi and running an app) can occur as timed events. Also note that this re-assignment of the camera button will nullify the default behavior when this task is active (in any situation that allows the LED is able to be toggled), but will behave normally otherwise.
Widgets work well, but it’s nice to have a hardware button option to turn your phone into a flashlight.
Tasker can do a lot more in-depth stuff, too. It allows creation of if/then statements, variable manipulation, loops, and other programming methods as well as a tap and build interface. Have your own favorite Tasker functions? Share your conditional/automated enthusiasm in the comments!