lockscreen time

153 views
Skip to first unread message

marko

unread,
Jun 2, 2011, 7:55:21 PM6/2/11
to Tasker
hey guys, i need to have a "grace" period between my screen timeout
and having to unlock my screen... say 10 minutes where i can turn it
back on without having to unlock it. how can i do that?

thanks!

Pent

unread,
Jun 3, 2011, 4:32:18 AM6/3/11
to Tasker
> hey guys, i need to have a "grace" period between my screen timeout
> and having to unlock my screen... say 10 minutes where i can turn it
> back on without having to unlock it. how can i do that?

It's only really possible on a 2.1 or lower device I think. The
problem is that on later Android versions playing with the keyguard
when the device is already locked causes side-effects.

Pent

sayling

unread,
Jun 4, 2011, 6:45:27 AM6/4/11
to Tasker
Could you have a Display Off event, with the following actions:

If %KEYG ~ off
Wait 10 minutes
Keyguard on
End if


By the way, quick question... Do you need an End If for every If
action, ie if I have 2 If actions, do Ineed 2 End If actions?

sayling

unread,
Jun 4, 2011, 6:58:05 AM6/4/11
to Tasker
No, you can't, you stupid man... because although the Display Off
event is picked up/detected, the actions don't run while the display
IS off... the outcome being that nothing happens while the display is
off when the keyguard is off, but 10 minutes after the display is
turned on, keyguard is turned on.

Bah, sorry

sayling

unread,
Jun 4, 2011, 7:51:34 AM6/4/11
to Tasker
Yes, you can, stupider man that gives up easily...

How about:

If %KEYG ~ off
Wait <whatever time interval you want>
Keyguard Set On, If %SCREEN ~ off
Turn On, If %KEYG ~ on
System Lock, If %KEYG ~ on
End If

The bit that had me thrown for a while was the task not properly
firing WHILE the display was off. To get round this, set the Task
Properties to Keep Device Awake.
However, the Keyguard will still only be set once the Display has
actually come on - the Turn On action sorts that out.
But then Tasker would turn Keyguard on after the time had elapsed, so
that's why there is the 'If %SCREEN ~ off' bit for the 'Keyguard Set
On' action.
So putting in the System Lock action, but ONLY if the Keyguard is on,
turns the display off immediately after it has come on to enable
Keyguard - but not if you have turned Keyguard off manually.

For that, have a look at the Keyguard toggle widget (http://
tasker.wikidot.com/keyguardtog), which I have installed and played
around with.

I have a profile that sets the Keyguard on when the phone isn't being
charged or has no USB plugged in, with the event Display Off, so I
just added the above actions to the Lock task and it seems to work
okay.

Hmmm - mebbe I should add it to the Wiki?
> > > Pent- Hide quoted text -
>
> - Show quoted text -

Elliot

unread,
Jun 4, 2011, 1:38:38 PM6/4/11
to Tasker
Added to the wiki would be great. This is a little bit hard to
follow.

sayling

unread,
Jun 5, 2011, 3:47:34 PM6/5/11
to Tasker
Done - have a look at http://tasker.wikidot.com/alternative-delayed-keyguard-enabler-with-homescreen-toggler

I'm afraid I find it difficult to do 'short' ;)
> > > - Show quoted text -- Hide quoted text -

sayling

unread,
Jun 14, 2011, 4:42:46 PM6/14/11
to Tasker
Update:

Now that I find myself on Gingerbread, I note that the //Display Turn
On// action is no longer available. I've updated the step through
(http://tasker.wikidot.com/alternative-delayed-keyguard-enabler-with-
homescreen-toggler) to show how to make it work on Gingerbread and pre-
Gingerbread versions.

On Jun 5, 8:47 pm, sayling <saylin...@gmail.com> wrote:
> Done - have a look athttp://tasker.wikidot.com/alternative-delayed-keyguard-enabler-with-h...
Reply all
Reply to author
Forward
0 new messages