Best daily deals
Best daily deals

Links on Android Authority may earn us a commission. Learn more.

Shake it to wake it, Tasker gesture to wake display - Android customization

Based on your requests, here is a basic project on how to wake your device with gestures. Shake it to wake it using Tasker - Android customization
By
May 5, 2016

After our Android customization project last week, creating our own Ambient Display feature for any phone, many of you asked if Tasker can handle other, more appropriate screen-on functions. As requested, let’s look at a simple method to use Tasker to wake your display.

There are more advanced tools in Tasker that will work better and reduce battery consumption, but let’s get through the basics first, using the simple gesture controls pre-recorded by Tasker. The idea is simple then, this project will allow you to wake your phone just by shaking it.

Related reading:

Before we begin

Please allow me to start by reiterating that warning, this project will work on most devices, but not all, and it requires that Tasker prevent your accelerometer from entering sleep mode. However, the newer Doze feature in Android Marshmallow and newer may still override this and put things to bed, in which case this project will stop working until you wake your device the old fashioned way, by calling it, or I guess just hitting that power button.

All that out of the way, take your newer Android device, make sure you’ve got Tasker installed, $2.99 in the Google Play Store, as well as Secure Settings, free in the Google Play Store with in-app unlock-able content. Now let’s get started.

Shake your phone to wake the display

Tasker offers more than one way to read movement from your accelerometer and gyroscope, we will be utilizing the simplest of the offerings, allowing us to act upon ‘shakes’ side to side, forward and back or up and down.

We will also be overriding the recommended settings, allowing Tasker to keep track of your sensors while the display is turned off. This is a good way to eat up your battery in no time. I never said this project was perfect, but I’m always up for a learning experience, hope you are too.

Before we start building the normal Tasker Tasks and Profiles, hit that menu button in the top right and head into Preferences.

Tasker shake wake display 4

Tap into the Monitor tab and scroll down, keep scrolling, you’ll find Accelerometer down there. It probably has the option When Power Connected turned on, you will need to change this to Yes or Yes, and keep Android Awake. Then say goodbye to your battery life!

Hint: At the bottom of this same Monitor tab is the Gesture and accelerometer calibration settings, you might prefer to look into that, particularly the Orientation State settings. It might have been smarter for me to build today’s project based on orientation state, but I think you can get more use out of the shake feature.

Settings in place, head into the Tasks tab and begin a new Task.

I’ll call my Task “ScreenOn“. Wait, didn’t we do that last week? Sure did, check it out here.

Tap the “+” button to ad your first action.

Tasker Ambient Display Notification

Select Plugin.

Select Secure Settings.

Tap the pencil Configuration button.

Expand Actions.

Select Wake Device.

Change the Duration to an amount of time that makes sense for you. Remember your battery life, but also give yourself enough time to unlock your device and use it.

Click Save at the top.

Tap the system Back button a couple times, we’re done with the Task, let’s now create the associated Profile.

Head over to the Profiles tab and start a new Profile.

Tasker shake wake display 2

Select Event.

Select Sensor.

Select Shake.

Your choice now, Left-Right is a chopping action, Up-Down is like shaking your friends soda can before they open it and Backwards-Forwards will make people think you are waving at them backwards. Choose an Axis, I’m going with Left-Right, because my device does not already have a chop feature, does yours?

Tasker shake wake display 3

You are probably going to come back here later to edit the Sensitivity and Duration settings. Both of which control how hard it is to accidentally trigger the Shake gesture.

Tap the system Back button to save.

Choose your ScreenOn Task from the list.

Turn off your display and start shaking your phone! Wow, slow down there choppy, a flick of the wrist should be enough.

What’s next

Tasker shake wake display 1

See what I did there? Encase the screen on action in an IF statement that makes sure the display is off before it fires. This should help clean up a few things as you go.

Allow me to bore you with this, but I have to say it again, I do not recommend this project the way it is. Now, go ahead and leave it up for a couple days, you may find that it has no tangible impact on your battery life, in which case, lucky you, enjoy your new toy. For the rest of us, having Tasker watch our sensors while the display is off is counter intuitive to Doze mode and better battery life practices.

You may find, however, that watching device orientation works better for you. This is a sensor that many devices will wake up for other uses anyway, in which case Tasker can piggy back off of that, read the sensor and perform an action with minimal battery interruption. Again, not bulletproof, but worth looking at.

Last, since we’re playing with turning on the display, don’t forget that Secure Settings has the ability to bypass your Lockscreen as well. Now we’re getting into the paid and root functionalities, but it was worth mentioning.

Next week

Admitting that this is a project I have revived from several years back, I hope that this Android customization to shake your phone awake brings value to your Tasker purchase. Next week is going to be tough, folks, I’ll either be playing with Android Wear again or getting back into root apps and tools. If you have a preference, be sure to let me know, otherwise, a surprise project is on its way.

If shake is not your thing, how do you use Tasker to turn on your device?

More Android customization projects: