Some complicated tasker question...

agp423

Well-known member
Aug 31, 2013
91
0
0
Visit site
Hi all, I have been playing with Tasker for a while now on my HTC One but can't figure this out. Here's what I am trying to accomplish:

I currently do not have a slide unlock or any sort of password.

If the phone is facing up, when I get a notification, I want the screen to turn on for 5 seconds and show a pop up of the message. If I click on the pop up, open the message. Otherwise turn off screen after 5 seconds.

I have gotten part of it to work - when I get a new notification, the screen will come on. But I do not know how to have it show a pop-up of the message. And sometimes (not sure what causes this) when charger the phone via a computer's USB, the screen never turns off (in general, or on notification) unless I press the lock button. Someone on the Google Tasker group suggested the following to fix this, which I do not know how to input:
Code:
To stop that from happening...
Profile: When Screen Is Off (237)
        Priority: 9 CoolDown: 0
        Event: Variable Set [ Variable:%SCREEN Value:off ]
Enter: Set Slide_lock ~ enabled (233)
        A1: Zoom State [ Element:Slide Lock Toggle.w / Switcher1 State:2 ] If [ %Keyguard ~ disabled ]
        A2: Stay On [ Mode:Never ] 
        A3: Variable Set [ Name:%Slide_lock To:enabled Do Maths:Off Append:Off ]

Profile: Display Unlocked (236)
        Priority: 7 CoolDown: 0
        Event: Variable Set [ Variable:%SCREEN Value:on ]
        State: Variable Value [ Name:%Keyguard Op:Matches Value:disabled ]
Enter: Set Slide_lock ~ disabled (232)
        A1: Zoom State [ Element:Slide Lock Toggle.w / Switcher1 State:1 ] If [ %Keyguard ~ enabled ]
        A2: Variable Set [ Name:%Slide_lock To:disabled Do Maths:Off Append:Off ]

Profile: Display Unlocked (249)
        Priority: 7 CoolDown: 0
        Event: Display Unlocked
        State: Variable Value [ Name:%Keyguard Op:Matches Value:enabled ]
Enter: Set Slide_lock ~ disabled (232)
        A1: Zoom State [ Element:Slide Lock Toggle.w / Switcher1 State:1 ] If [ %Keyguard ~ enabled ]
        A2: Variable Set [ Name:%Slide_lock To:disabled Do Maths:Off Append:Off ]

Profile: Screen Settings When Powered (238)
        Priority: 8 CoolDown: 0
        State: Power [ Source:Any ]
Enter: When Power Pluged In (234)
        Abort Existing Task
        A1: System Lock If [ %Slide_lock ~ enabled ]
        A2: [X] If [ %Keyguard ~ enabled ]
        A3: [X] System Lock If [ %Slide_lock ~ enabled ]
        A4: [X] Else If [ %Keyguard ~ disabled ]
        A5: [X] System Lock If [ %Slide_lock ~ enabled ]
        A6: [X] End If

Exit: When Power UnPluged (235)
        Abort Existing Task
        A1: If [ %Keyguard ~ enabled ]
        A2: System Lock If [ %Slide_lock ~ enabled ]
        A3: Else If [ %Keyguard ~ disabled ]
        A4: System Lock If [ %SCREEN ~ off ]
        A5: End If

Profile: Screen Settings When Powered (267)
        Priority: 8 CoolDown: 0
        State: Power [ Source:Any ]
        State: Variable Value [ Name:%Slide_lock Op:Matches Value:disabled ]
Enter: Stay On (278)
        A1: Stay On [ Mode:With AC or USB Power ] 
        A2: Display Timeout [ Secs:* Mins:* Hours:* ]

Exit: Stay Off (320)
        A1: Display Timeout [ Secs:45 Mins:0 Hours:0 ] 
        A2: Stay On [ Mode:Never ]

For reference:

Enable Keyguard (124)
        A1: Secure Settings [ Configuration:Keyguard Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ] 
        A2: Perform Task [ Name:Set Slide_lock ~ disabled Stop:Off Priority:10 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] 
        A3: Variable Set [ Name:%Keyguard To:enabled Do Maths:Off Append:Off ] 
        A4: Zoom State [ Element:Slide Lock Toggle.w / Switcher1 State:1 ]

Disable Keyguard (120)
        A1: Secure Settings [ Configuration:Clear Password Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ] 
        A2: Secure Settings [ Configuration:Keyguard Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ] 
        A3: Perform Task [ Name:Set Slide_lock ~ enabled Stop:Off Priority:10 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] 
        A4: Variable Set [ Name:%Keyguard To:disabled Do Maths:Off Append:Off ] 
        A5: Zoom State [ Element:Slide Lock Toggle.w / Switcher1 State:2 ]


Any help is much appreciated, there may be prizes for someone who can help me out!
 
Last edited:

Trending Posts

Forum statistics

Threads
942,926
Messages
6,916,530
Members
3,158,740
Latest member
taylorhudson5670