Can Tasker detect if the lockscreen has been unlocked.

3,233 views
Skip to first unread message

Charles Deens

unread,
May 15, 2014, 7:04:11 AM5/15/14
to tas...@googlegroups.com
I would like to run a task when the lockscreen is unlocked with its code. It appears Tasker can detect whether or not the keyguard is disabled or enabled. Though, it doesn't appear Tasker can recognize if the lockscreen has been unlocked.

I've searched a bunch of topics, though they're all related to enabling the keyguard.

Any help is appreciated. Thanks.

Aayush Arya

unread,
May 15, 2014, 9:21:45 AM5/15/14
to tas...@googlegroups.com
It’s under ‘Event » Display » Display Unlocked’.

Charles Deens

unread,
May 15, 2014, 12:19:13 PM5/15/14
to tas...@googlegroups.com
Thanks for the reply, though that didn't work for me. I have an event to disable the keyguard when connected to wifi. I added the "Display Unlocked" to the Wifi connected event, though it still disables the keyguard even with the lockscreen locked. I want it to disable the keyguard after the lockscreen is unlocked.

Aayush Arya

unread,
May 15, 2014, 12:40:41 PM5/15/14
to tas...@googlegroups.com

What are you trying to achieve? Unlocking your phone when it's connected to Wi-Fi?

Regards,
Aayush

(Handcrafted on my phone.)

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/Jr8CzzNe5vA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Charles Deens

unread,
May 15, 2014, 12:50:04 PM5/15/14
to tas...@googlegroups.com
I want my phone to disable the keyguard when connected to my wifi network, however I don't want it to disable the keyguard if the lockscreen is locked.

I found that if the keyguard is disabled when the lockscreen is locked, it will re-enable itself when the home button is pressed. So that's why I do not want the keyguard disabled if the lockscreen is locked.

Scott S

unread,
May 15, 2014, 1:09:08 PM5/15/14
to tas...@googlegroups.com
Assuming the lockscreen is also disabled when connected to your wifi...disabling the keyguard is a big hit or miss. I've tried several ways and the end result for me was to use Secure Settings plugin to change the Lockscreen timeout. Basically, this would allow me to extend the timeout when connected to a hotspot, but the keyguard would still be active. Then, when at home, connected to wifi, my lockscreen and keyguard are disabled.

Another option that worked most of the time for me was using an Xposed framework Mod. The problem with the keyguard is it's tied to the Notifications shade, so even if you disable it, the keyguard will reappear after viewing notifications. The dev of the Xposed mod removes the code, temporarily, that allows the keyguard to reappear...if that makes sense.

Charles Deens

unread,
May 15, 2014, 8:11:41 PM5/15/14
to tas...@googlegroups.com

Thanks for your response. I found that if the keyguard is disabled after the phone is unlocked, it will remain unlocked. However, if the keyguard is disabled while the phone is locked, the keyguard will come back on. Thats why I was looking for an event that can be fired once the lockscreen is unlocked. Unfortunaltely, it doent appear to be any event announing the lockscreen is unlocked. I even checked the debug log, and when the locke screen is unlocked, the only thing I can find in the debug is  WindowManager : Lock screen displayed. It would be greate if Tasker can tell exactly when the lockscreen is unlocked. I tried Dispaly unlocked, but that does not work.

Scott Miller

unread,
May 15, 2014, 8:26:05 PM5/15/14
to tas...@googlegroups.com

Take a look at Widget Locker. It's a lock screen replacement that has tasker integration to enable and disable.

https://play.google.com/store/apps/details?id=com.teslacoilsw.widgetlocker

Scott

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Brandon Horwath

unread,
May 15, 2014, 8:54:57 PM5/15/14
to tas...@googlegroups.com
I've owned that for awhile but gave up since it didn't work with my secure settings disable lockscreen task!

How did you manage this?

Matt R

unread,
May 15, 2014, 11:10:18 PM5/15/14
to tas...@googlegroups.com
The display unlocked event should be correct. Can you post your exported profile description (long-press the profile name and select menu -> export -> description to clipboard and paste in a reply here)?

Matt

Scott Miller

unread,
May 15, 2014, 11:19:43 PM5/15/14
to tas...@googlegroups.com
Widget Locker? I've had it for quite a while and haven't been using it, because of similar reasons. It wasn't reliable, and I hadn't seen updates in a while. One day I saw an update, but didn't pursue it. Then I ended up on a GS4, and got Android up to 4.3. I've been wanting to play with Dash Clock for some time, but when I did, and had Secure Settings disable my lockscreen, I couldn't see Dash Clock. So it occurred to me that Widget Locker might allow me to add Dash Clock. I tried it, and it worked. So that is what I use, now. I still have Secure Settings clear my password and disable the lockscreen. But of course, Widget Locker stays on. Until you issue a Widget Locker command to disable it. I only do this at night before I go to bed, so I don't have to fumble with the lockscreen if I have to look at my phone in the middle of the night. In the morning I enable it again. So there is an extra step involved, but it works.For me, at least. I use a pin for my passcode, which is one of the more reliable methods for Secure Settings to work with. I've read plenty about people trying to use pattern lock, or even passphrase, and not having reliable results. The profiles and tasks I use are below. Every now and again Widget Locker doesn't enable correctly, but it has never failed to disable. 

Profile: KeyGuardOff (75)
Enforce: no
State: Variable Value [ %KEYGUARDOFF Is Set ]
Enter: KeyGuardOff Enter (76)
Abort Existing Task
A1: Secure Settings [ Configuration:Screen & Keyboard Lights On
5 Seconds Package:com.intangibleobject.securesettings.plugin Name:Secure
Settings Timeout (Seconds):0 ]
A2: Secure Settings [ Configuration:Clear Password
Package:com.intangibleobject.securesettings.plugin Name:Secure Settings
Timeout (Seconds):0 ]
A3: Secure Settings [ Configuration:Keyguard Disabled
Package:com.intangibleobject.securesettings.plugin Name:Secure Settings
Timeout (Seconds):0 ]

Exit: KeyGuardOff Exit (77)
Abort Existing Task
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Stop [ With Error:Off Task: ] If [ %PACTIVE ~ *,keyguardoff,* ]
A3: Secure Settings [ Configuration:Screen & Keyboard Lights On
5 Seconds Package:com.intangibleobject.securesettings.plugin Name:Secure
Settings Timeout (Seconds):0 ]
A4: Secure Settings [ Configuration:Keyguard Enabled
Package:com.intangibleobject.securesettings.plugin Name:Secure Settings
Timeout (Seconds):0 ]
A5: Secure Settings [ Configuration:Set Pin
Package:com.intangibleobject.securesettings.plugin Name:Secure Settings
Timeout (Seconds):0 ]


Profile: Night time (4)
Priority: 4 Enforce: no
Time: From 23:31 Till 05:59
State: Variable Value [ %CARDOCKED ! Set ]
Enter: Start Of Night (13)
A1: Bluetooth [ Set:Off ] If [ %BTOOTH ! Set ]
A2: Execute [ Configuration:sh /sdcard/scripts/n.sh 
Package:de.elmicha.app.LocaleExecute Name:Execute Timeout (Seconds):0 ]
A3: Notification Volume [ Level:4 Display:Off Sound:Off ]
A4: Variable Set [ Name:%KEYGUARDOFF To:Yes Do Maths:Off Append:Off ]
A5: Variable Set [ Name:%NIGHTTIME To:1 Do Maths:Off Append:Off ]
A6: LED Controller [ Configuration:Off,Off,Off,Off,Off,Off
Package:com.tinyroar.galaxys3ledcontroller Name:LED Controller Timeout
(Seconds):0 ]
A7: WidgetLocker [ Cmd:Disable ]

Exit: End Of Night (14)
A1: Execute [ Configuration:sh /sdcard/scripts/d.sh
Package:de.elmicha.app.LocaleExecute Name:Execute Timeout (Seconds):0 ]
A2: Notification Volume [ Level:5 Display:Off Sound:Off ]
A3: Variable Clear [ Name:%KEYGUARDOFF Pattern Matching:Off ] If [ %ATHOME
! Set ]
A4: Variable Clear [ Name:%NIGHTTIME Pattern Matching:Off ]
A5: LED Controller [ Configuration:On,On,On,On,Off,Off
Package:com.tinyroar.galaxys3ledcontroller Name:LED Controller Timeout
(Seconds):0 ]
A6: WidgetLocker [ Cmd:Enable ]

Scott


On Thu, May 15, 2014 at 8:54 PM, Brandon Horwath <brandon...@gmail.com> wrote:
I've owned that for awhile but gave up since it didn't work with my secure settings disable lockscreen task!

How did you manage this?

Aayush Arya

unread,
May 15, 2014, 11:24:42 PM5/15/14
to tas...@googlegroups.com

I just put a DashClock widget on my Home screen as well as the lock screen, so I see it when I'm in my car, house or office and the lock screen is disabled, and also when I'm out and about.

What is the advantage of using WidgetLocker over my method?

Regards,
Aayush

(Handcrafted on my phone.)

You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/Jr8CzzNe5vA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

Scott Miller

unread,
May 15, 2014, 11:37:09 PM5/15/14
to tas...@googlegroups.com

I just put a DashClock widget on my Home screen as well as the lock screen, so I see it when I'm in my car, house or office and the lock screen is disabled, and also when I'm out and about.

What is the advantage of using WidgetLocker over my method?

Advantage?  Not much, really. Widget Locker does have direct Tasker integration. It's not a plug-in, it's a built-in 3rd party action. (Thanks, Pent!) Six commands are supported: Enable, Disable, Suspend, Resume, Activate, and Unlock. I only use the Enable and Disable commands. Widget Locker was the first lockscreen replacement that supported the use of widgets. When it first came out, that was its big advantage. Obviously with Android 4.3 and newer, adding widgets to the lockscreen is now built-in. So there is less incentive to use it. But for me, it solved a problem. Your mileage may vary.

@Charles, I hope this didn't hijack your thread too badly. For your situation, it might be just the solution because of the more granular control you can have over the lockscreen.

Scott

Brandon Horwath

unread,
May 16, 2014, 1:29:20 AM5/16/14
to tas...@googlegroups.com
A7: WidgetLocker [ Cmd:Disable ]

Ah!

Thanks.

Reply all
Reply to author
Forward
0 new messages