If you care about battery life I strongly advice you to use another way. For example the proximity sensor.
On Friday, June 7, 2013 2:25:18 AM UTC+2, Tom Carr wrote:
I would love to be able to set up an event to wake up my HTC One without having to hit the power button. I set up a profile that uses a shake event to trigger a Secure Settings task that wakes up my phone. This does not work. When I turn on logging in Tasker, I see that the shake event never registers while the display is off. As soon as the display is on and I shake my phone, the Tasker run log starts showing entries (i.e. the shake event is triggering my Tasker profile).
I discovered, however, an exception to this: the 'shake' profile actually works perfectly as long as my phone is plugged into a power source (either AC or USB to my laptop). In that case, the shake event works perfectly and the screen turns on without me having to hit the power button.
Any ideas why this is happening? And, if so, are there any ways I can use this knowledge to my advantage (i.e. somehow fooling the phone into thinking it's always plugged in so that my shake event profile can work)?
Thanks in advance!