[Galaxy Note II Themes and Apps] zuckerj:
PINGuard/KeyGuard Toggle:

I like having a keyguard on at all times, but sometimes I only want it to be a swipe gesture to clear the keyguard, and sometimes I want it to be a PIN entry when I'm out and about.

I didn't want the PIN keyguard to come up WHENEVER I left my home, or work, but just when I decided I wanted PIN security.

So I made a Widget Toggle that toggles PIN entry to clear the keyguard. It also changes the image on the toggle so that you can see the current state and it pops up and removes a notification on your notification bar when you switch back and forth.

The nice thing is that this widget DOES NOT turn on and off the Lock Screen (keyguard) functionality so you always have a lock screen enabled and you are not prone to the foibles of other apps that muck with the Lock Screen Status.

So I thought I'd share as I had difficulty finding a good walkthrough to set this up. Now I'm sure that this can be done better, and more efficiently. But it works, and being a noob at this, I'm just excited to have what I want.

Inspired by Keyguard Toggle Widget found on Tasker Wiki

Here you go:

PreReq: You must install "Secure Settings" app/plugin by intangibleObject.

A ) Add a "Task" widget to your HomeScreen.

B ) Select "New Task"

C ) Name your Task - I used "PINGUARD"

D ) Begin adding Actions to your task by clicking on the "+" located at the bottom

1 ) Variable Add (Initialize a Variable for use as a toggle) - Menu Option: Variables->Variable Add

a ) Name: %LOCKSCREEN

b ) Value: 1

c ) If: %LOCKSCREEN !SET (Is Not Set)

2 ) Secure Setting (Set PIN/Password) - Menu Option: Plugin->Secure Settings

a) Configuration: (Click Edit - This will take you to Secure Settings Plugin)

* Scroll Down to " Dev Admin Actions " section and select "Password/Pin"

* Now hit the " DISABLE " button to toggle it to " ENABLE " and you'll be asked to provide either a PW or a PIN (I Suggest PIN) and save

b ) If: %LOCKSCREEN matches 0

3 ) Secure Setting (Clear PIN/Password) - Menu Option: Plugin->Secure Settings

a ) Configuration: (Click Edit - This will take you to Secure Settings Plugin)

* Scroll Down to " Dev Admin Actions " section and select " Password/Pin "

* Leave the button in the " DISABLE " state and save

b ) If: %LOCKSCREEN matches 1

4 ) Set Widget Icon (Enabled) - Menu Option: Tasker->Set Widget Icon

a ) Name: " PINGUARD " (Name must match Task name)

b ) Choose an icon (Green check, key symbol, whatever. I chose a green circle with a key in it)

c ) If: %LOCKSCREEN matches 0

5 ) Set Widget Icon (Disabled) - Menu Option: Tasker->Set Widget Icon

a ) Name: " PINGUARD " (Name must match Task name)

b ) Choose an icon (Red X. I chose a red circle with an " X " in it)

c ) If: %LOCKSCREEN matches 1

6 ) Notify (Pinguard Enabled) - Menu Option: Alert->Notify

a ) Title: " PinGuard Enabled "

b ) Choose enabled icon

c ) Number: 0

d ) Permanent: Unchecked

e ) Priority: Whatever it comes up (Mine was 3)

f ) Action: Don't touch it

g ) If: %LOCKSCREEN matches 0

7 ) Notify (Pinguard Disabled) - Menu Option: Alert->Notify

a ) Title: " PinGuard Disabled "

b ) Choose disabled icon

c ) Number: 0

d ) Permanent: Unchecked

e ) Priority: Whatever it comes up (Mine was 3)

f ) Action: Don't touch it

g ) If: %LOCKSCREEN matches 1

8 ) Wait (Display Time for notification of 1 second) - Menu Option: Task->Wait

a ) Seconds: 1

9 ) Notify Cancel (PinGuard Enabled - Remove) - Menu Option: Alert->Notify Cancel

a ) Title: " PinGuard Enabled "

b ) If: %LOCKSCREEN matches 0

10 ) Notify Cancel (PinGuard Disabled - Remove) - Menu Option: Alert->Notify Cancel

a ) Title: " PinGuard Disabled "

b ) If: %LOCKSCREEN matches 1

11 ) Goto (To Properly set %LOCKSCREEN variable) - Menu Option: Task->Goto

a ) Type: Action Number

b ) Number: (For now set it to 10, we'll come back and modify this in a few minutes)

c ) If: %LOCKSCREEN matches 0

12 ) Variable Set (%LOCKSCREEN to 0) - Menu Option: Variables->Variable Set

a ) Name: %LOCKSCREEN

b ) To: 0

c ) If: %LOCKSCREEN matches 1

13 ) STOP - Menu Option: Task->Stop

14 ) Variable Set (%LOCKSCREEN to 1) - Menu Option: Variables->Variable Set

a ) Name: %LOCKSCREEN

b ) To: 1

c ) If: %LOCKSCREEN matches 0

E ) Now you need to go back to Action Number 11 and change the " Number " to 14

F ) Now hit the done button, in the version of Tasker I'm using it is the Tasker icon at the Top Left corner next to " Task Edit "

You are done!

Congratulations, hopefully you have a cool new PINGuard toggle.

Hope this is useful to at least SOMEONE out there.

Jedi Master (17) - Galaxy Note 2 (T889) - Saber (44.6)