Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 1 of 1
  1. Thread Author  Thread Author    #1  
    agp423's Avatar

    Posts
    88 Posts
    Global Posts
    493 Global Posts

    Default Some complicated tasker question...

    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 by agp423; 10-30-2013 at 09:42 AM.

Similar Threads

  1. Replies: 10
    Last Post: 04-27-2014, 08:13 PM
  2. HTC One Variant Question!
    By Jose Vera1 in forum AT&T HTC One
    Replies: 5
    Last Post: 10-31-2013, 10:41 AM
  3. Unbricking Verizon Note 2 Using Odin: Question
    By shipshore64 in forum Samsung Galaxy Note 2 Rooting, ROMs, and Hacks
    Replies: 1
    Last Post: 10-30-2013, 10:40 PM
  4. Replies: 1
    Last Post: 10-30-2013, 02:15 PM
  5. Some help por favor
    By DashGlobal in forum Samsung Galaxy S4
    Replies: 1
    Last Post: 10-30-2013, 03:41 AM

Posting Permissions