Android customization – using Tasker to control display timeout and rotation
Are you getting the hang of Tasker yet? We’ve spent a few weeks now working through a number of relatively simple Tasker Tasks and Profiles including setting your alarm volume so you don’t sleep in, silencing your phone at night, and making sure those few important calls get through, even when the phone is silent.
The previous Tasker projects were designed as much to get you familiar with working with Tasker as they were to provide simple, yet invaluable, functionality. Today, we will continue this trend as our Android customization series continues.
Let’s use Tasker to automate the display timeout and rotation settings.
Before we get started
I think you know it already, you’re going to need an Android device with Tasker installed. Tasker is still $2.99 in the Google Play Store.
On most versions of Android you can head into Settings -> Display -> Sleep, or something similar to that, if you want to manually control the display timeout setting. As you also know, many apps have the ability to override this setting to keep your screen turned on indefinitely. Some apps, however, do not come with this ability, allowing the display to turn off just when you need it most.
Personally, I find camera apps to be the biggest offenders. I start Camera, get settled to take my shot and boom, my screen turned off and I have to start again. Bad example? Perhaps you have a game installed that has lengthy cut-scenes, but you’ve never seen them through because your display shuts off on you. Or you just want to use Google Maps as a navigation tool in the car, but it keeps shutting off.
Let’s take a look at how Tasker can keep your display turned on for you. First step will be to create the Task that keeps the display turned on, then a Profile to trigger it.
Head on into Tasker and get to the Tasks tab. Tap the “+” button at the bottom to create a new Task.
Name your Task uniquely and concisely. I will call mine “KeepScreen”. (In homage of the single purpose app that can do this too.)
Tap the “+” symbol to add an action.
Select Display Timeout.
Set your desired time to keep the display turned on. I assume that you already have your device set to turn off after about a minute, thus, you’ll want to have a greater timeout here. Myself, I’ll go with 59 Secs, 59 mins and 23 Hours, which, is interpreted as ‘infinite’ for our purposes here.
Tap the system back button to confirm settings, then again to exit the Task Edit screen.
Simply enough, you now have a Task ready to keep your display turned on for a custom amount of time. Let’s now go figure out when to use it.
Navigate over to the Profiles tab and hit the “+” button to create a new Profile.
You are presented with a list of all installed apps on your device, go ahead and choose the apps that you want to keep your screen awake for. Myself, I select my camera apps, the games and media player apps that I know fall asleep on me, My Tracks and Maps for hiking and driving, Google Photos, so the screen stays on when I’m showing my friends my hiking pictures, and Ingress.
Note: I have observed no issues in assigning apps that already handle their own display timeout.
Hit the system back button to confirm your apps.
You are now presented with the list of all of your created Tasker Tasks, choose your “KeepScreen” Task.
Congratulations, you’ve completed another Tasker project and are starting to really get your money’s worth out of this app.
By default, Tasker is designed to return any changed system setting to the original value when a Profile is completed. If you find that your default display timeout does not return, go ahead and create another Task that sets your display timeout back down to your desired default time, then add it as an Exit Task in the profile you created above.
If you’ve worked through the above display timeout tutorial, then you’ll find that using Tasker to control display rotation is pretty simple too. The idea here is to have your display rotation locked by default, but unlocked for specific apps, follow the same basic steps as above, simply change up your Task as follows:
Task name “NoImSpinner.”
Select Display Rotation.
Set to On.
Follow the same steps as above for the Profile, or find other creative ways to control when you want your display to be able to rotate.
What is next?
I’ve presented a very simple method of enabling/disabling display timeout and rotation, you’ll have to get more creative if you want finer tuned controls. Perhaps you always read a book before sleep, but the display rotates on you when you lay down – you may want to assigns display rotation for your reading app so that it auto rotates during the day, but stays locked after 10pm, or whatever works best for you.
One of our readers asked if Tasker can control display brightness based on the light sensor. If you also do not like how the default auto-brightness works, create brightness Tasks with Display->Display Brightness. Create Profiles with State->Sensor->Light Level. You will have to play around to see what Display Brightness levels work best for your needs, and which Light Level readings best trigger the Tasks, but these are the items you are looking for. As for those games you play that your thumb covers the light sensor, try adding additional parameters to the Profiles that account for the apps running. (Hope that helps, Mr. Meatloafers.)
Next week in our Android customization series we’ll take a look at utilizing NFC tags using an app called Trigger. If you wish to do some homework, we’ve previously explained what NFC is, and how NFC Tags work. Trigger offers the ability to write your own information to NFC tags, and use it to control your Android device. Hint: you could use an NFC tag to trigger a Tasker Task, but we’ll talk about that another time.
How do you like to keep your display timeout and rotation settings? Are you a portrait or landscape user?