Can tasker turn on/off screen like what smart cover app does?

19,509 views
Skip to first unread message

Newbie

unread,
Apr 19, 2012, 4:28:25 AM4/19/12
to Tasker
Hi I'm new to tasker. I'm wondering if tasker can turn on/off screen
like what Smart Cover app does? Below is the description of Smart
Cover app.

Description
If your device has a proximity sensor.. Close cover, and Device
automatically goes to sleep. Open cover, and Device instantly wakes
up.
Any Tablet, Any Phone, Any Cover.
For example flip cover, Leather cover, Diary cover, Book cover etc...

Any suggestion would be appreciated.

Pent

unread,
Apr 19, 2012, 5:39:05 AM4/19/12
to Tasker
> Hi I'm new to tasker. I'm wondering if tasker can  turn on/off screen
> like what Smart Cover app does?

Off, yes: System Lock action.

On: no: I don't know how to achieve that with Android.

Pent

Newbie

unread,
Apr 19, 2012, 5:43:25 AM4/19/12
to Tasker
Thank you Pent.

Yes you are right it does work with Off but even with Secure Settings
Helper I still couldn't make On work.

Teasüti

unread,
Apr 19, 2012, 6:32:19 AM4/19/12
to Tasker
Are you use original rom (stock) w/o root?
Message has been deleted

Newbie

unread,
Apr 19, 2012, 6:38:09 AM4/19/12
to Tasker
I'm using a rooted 2.3.6 rom.

sayling

unread,
Apr 19, 2012, 10:50:26 AM4/19/12
to Tasker
You don't need root or the Helper app, just Secure Settings.

Here's a quick profile I set up to turn the screen on with Secure
Settings:
Test (45)
A1: Secure Settings [ Configuration:Screen Dim
4 Seconds ]

Turns the screen on with din lighting for for seconds

:)

Newbie

unread,
Apr 19, 2012, 12:14:20 PM4/19/12
to Tasker
sayling,

Thanks for your reply. This profile works fine but it won't work with
proximity sensor. I was told that the proximity sensor ( I suppose
light sensor too) is turned off when the screen is off in order to
save battery.

I'm curious that how Smart Cover achieves it.

Pent

unread,
Apr 19, 2012, 1:06:16 PM4/19/12
to Tasker
> I'm curious that how Smart Cover achieves it.

Well, the prox sensor doesn't *have* to be turned off, Tasker just
does it to save battery. I'm going to put an option in for it.

Pent

Teasüti

unread,
Apr 19, 2012, 1:44:27 PM4/19/12
to Tasker
I thought all the sensors shuts down if the screen goes out. You said
it's an Android feature.

baudi

unread,
Apr 19, 2012, 2:36:33 PM4/19/12
to tas...@googlegroups.com
That would be good. Then it would be possible to keep the screen disabled when a call comes in when the phone is in your pocket.

Pent

unread,
Apr 20, 2012, 3:20:34 AM4/20/12
to Tasker
> You said it's an Android feature.

When ?

Pent

Newbie

unread,
Apr 20, 2012, 4:10:50 AM4/20/12
to Tasker
That's great! I'm looking forward to the new version.

PS: a quick question, is there less battery usage if tasker is NOT
running foreground?

Pent

unread,
Apr 20, 2012, 4:59:43 AM4/20/12
to Tasker
> PS: a quick question, is there less battery usage if tasker is NOT
> running foreground?

I guess you mean when the monitor is not set to run foreground. There
might be, if Android kills the service. But it won't be very reliable
then...

Pent

ziotempa

unread,
Apr 24, 2012, 2:55:01 AM4/24/12
to Tasker
Marta cover on IP ad sessi magnets to switch :-)

Matt R

unread,
Feb 4, 2013, 12:38:50 PM2/4/13
to tas...@googlegroups.com
This works when your screen is off?  On my phone, keyevent 26 (any keyevent really) doesn't seem to register when the screen is off.  Also, you can run that command without the locale execute plugin.  Just run it through the Tasker script -> run shell action.

Matt

GermainZ

unread,
Feb 4, 2013, 12:44:28 PM2/4/13
to tas...@googlegroups.com
Why not simply use intents? Run this shell command (root is probably needed; case sensitive):
am broadcast -a android.intent.action.SCREEN_ON


On Monday, February 4, 2013 12:27:52 PM UTC+2, David Truccone wrote:
Yeah baby!, I found the way to turn on the screen (very simple BTW, jeje)

Just use the Locale Execute plugin (https://play.google.com/store/apps/details?id=de.elmicha.app.LocaleExecute&feature=search_result)
and run the following command: !input keyevent 26 (wich means, power button).
Off course you will need some extracode to "fancy up" your profile, like delays, checkpoints, etc.

Cheers!

Rich D

unread,
Feb 4, 2013, 12:49:21 PM2/4/13
to tas...@googlegroups.com

The plug in 'secure settings' will turn the screen on as well.. :)
And works better to disable key guard than the tasker action..

Rich D

unread,
Feb 4, 2013, 12:54:03 PM2/4/13
to tas...@googlegroups.com


On Feb 4, 2013 12:49 PM, "Rich D" <ricp...@gmail.com> wrote:
>
> The plug in 'secure settings' will turn the screen on as well.. :)
> And works better to disable key guard than the tasker action..

No root required .....

doc

unread,
Feb 6, 2013, 2:10:53 PM2/6/13
to tas...@googlegroups.com
But then how do you tell secure settings to turn on the screen when the proximity or light sensor is uncovered?

doc

unread,
Feb 6, 2013, 2:41:10 PM2/6/13
to tas...@googlegroups.com
I mean how do you tell secure settings to react when the screen is off, especially if you invoke the command through tasker?

Rich D

unread,
Feb 6, 2013, 6:12:56 PM2/6/13
to tas...@googlegroups.com

> I mean how do you tell secure settings to react when the screen is off, especially if you invoke the command through tasker?

Tasker will monitor the proximity sensor with the screen off if you enable the setting in menu / preferences / monitor ..

doc

unread,
Feb 7, 2013, 10:46:17 AM2/7/13
to tas...@googlegroups.com
Thanks RichD. I set up my own "CloseCover" and it works great!. Why would anyone need any other android program than Tasker and Secure Settings?

David Truccone

unread,
Feb 8, 2013, 3:54:38 AM2/8/13
to tas...@googlegroups.com
Yep, Rich D was right, secure setting works better than the keyevent, try it ;)

David Truccone

unread,
Feb 8, 2013, 3:56:23 AM2/8/13
to tas...@googlegroups.com
Hey there!, I'm trying to run that command but didn't work.
According with Google, "This is a protected intent that can only be sent by the system"

Cheers

Chris Lawrence

unread,
Feb 8, 2013, 9:56:08 AM2/8/13
to tas...@googlegroups.com
For what its worth, I've been doing this for a while myself with some tablets around my house.  I have a home automation system with motion sensors, using Autoremote as a responder to those motion sensor triggers, Tasker fires off a 'screen off' or 'screen on' task depending on the subject line to Autoremote.

Anyways I kind of "by accident" stumbled upon how to get the screen to turn off and on and be functional across whatever device type I was testing with (some devices would work and others not with some of the other methods I tried).  I use Widgetlocker and its Tasker integration.  Note: I don't use widgetlocker to ever lock or unlock the device, tasker does, Widgetlocker is only there because it pretty reliably turns the screen on or off as its told to.  Kind of the same thinking behind Pent's post above, but rather than using the system lock for the screen turning off, using WidgetLocker instead (since it can turn the screen on too).  WidgetLocker isn't free, but I already had it installed for its intended functionality.

Screen On Task:
------------------------------------------------------------
WidgetLocker Plugin - Unlock
WidgetLocker Plugin - Disable Widgetlocker
System Setting: set display timeout to never (optional but needed for what I'm doing)

Screen Off Task:
------------------------------------------------------------
System Setting: set display timeout to 7 seconds 
WidgetLocker Plugin - Enable Widgetlocker
WidgetLocker Plugin - Lock

Downside is that the screen turning off is not so "immediate", as there's a 7-10 second delay there, but the screen turning on is pretty instantaneous.  In my case the delay on the screen turning off is a bonus, leaving a bit of extra light in the room for a few seconds in case someone is still in the room and hadn't fully left yet.  I was never able to figure out a way to more reliably get the screen turned off (with some methods devices didn't act consistently, for other methods it just didn't work at all).

NIKHIL KESHAV

unread,
Jan 29, 2014, 2:32:24 AM1/29/14
to tas...@googlegroups.com
not working for me, can you help??

magna mentis

unread,
Jul 21, 2015, 9:11:48 AM7/21/15
to tas...@googlegroups.com


On Thursday, April 19, 2012 at 11:39:05 AM UTC+2, Pent wrote:
> Hi I'm new to tasker. I'm wondering if tasker can  turn on/off screen
> like what Smart Cover app does?

Off, yes: System Lock action.

On: no: I don't know how to achieve that with Android.

Pent

the system lock function is NOT identical with display off, i give you an example:

if you have your device setup with smartlock and if you use the power button or any other way to switch the display off, you can use you phone without having to type in the pin, password or use the pattern.

other than that, if you use the display lock function in tasker, it will lock you device, even though smart lock is set. this means that the tasker command from secure settings, smart lock is out-smarted which makes
in unusable for me, while before i could make a shortcut of the task and use it as an off button and/or automated it in tasker. of course whether one priorises one over the other is personal preference, for me it's important to have my device locked on the road, while unlocked in trusted places like home, office, car, bike (bluetooth) etc. 

however, since your questin was explicitely "like what smart cover does" i thought it's worth to mention that albeit the function indeed turns off the screen, it's not the same like using powerbutton and/or smart cover , hence it's not the same
Reply all
Reply to author
Forward
0 new messages