@kodochax
@tomcat84
@Edinho376
You guys might be interested in this
I saw a way to do this with tasker but i didn't want to buy it just for this functionality so I figured
how to make this work with a pair of apps i already had, both are free and useful and one of them you probably already have it.
(I have not tested very much but so far so good):
Timed PN Unlock + Slide Unlock
*update* i tested with password unlock (cm11 ) and it also works good, you just have to set the password in both phone settings and llama action
- Xposed with gravity box module
and
- llama (location profiles)
even tho we will not be using location for this (but you can if you want)
Set gravitybox with lockscreen option checked SLIDE BEFORE UNLOCK (I think it does same as the module in this thread so you can try this one if gravitybox is too much or just to see if this works also) this will make you use SLIDE UNLOCK even if you have no pin or password set for unlocking.
set your lockscreen to PIN unlock under your security lock settings of the phone (not in gravitybox or llama) and enable the lock.
Create a new event in llama ,
TimedLockPIN
with following settings
add following conditions:
Screen is OFF
Llama Variable vPINLOCK value is 0 (zero) (please read the important note below about the variable)
(
IMPORTANT VARIABLE NOTE, since variables in llama are created in the ACTIONS part, in order for the variable to be created the first time you MUST TEST actions in this event)
Under ADVANCED option in the event settings:
CHECK DELAYED
and set
delay time to say 5 minutes, we want this to pin lock the phone after 5 minutes of screen off
CHECK
CANCEL DELAYED IF FALSE
get out of advanced setings.
under Actions add the following :
Llama Variable
vPINLOCK set value to 1 this will tell the other event that phone is already using pin lock.
SPEAK "PIN ENABLED" (no quotes) this one can be removed later I just used for debugging purposes it to see if this was actually working when screen went off.
Llama Unlock Password and set your PIN CODE.
save this event and
create another event
I called this one:
TimedLockSlide
with following settings:
add following conditions:
Llama Variable vPINLOCK current value is 1
User is Present
Screen is ON
under Actions add the following :
Llama Unlock Password and set your PIN CODE to NOTHING ,if you have any value there, delete it, just taping ok twice should do it.
Llama Variable
vPINLOCK set value to 0 this will tell the other event that phone is already using SLIDE lock.
SPEAK "SLIDE ONLY" (no quotes) this one can be removed later i just used for debugging purposes it to see if this was working when screen was off.
Under Advanced settings go to TRIGGER FILTERING and uncheck SCREEN ON/OFF ,
this will prevent this event from triggering right after the screen goes ON when we hit the power button or slide unlock before we actually pin unlock it.
Test it with 10 or 5 seconds instead of 5 minutes and when you see its working remove the SPEAK parts , they are not needed.
the Speak and Llama notification icon colors you see in some images where just for testing this when screen was off and rigth after unlocking, they are NOT NEEDED (unless you like a chatty phone).
Hope this servers anyone needs. but to be honest it would be MUCH EASIER in an xposed module lol.