Matt
I am trying to start a task when the screen is locked (the user can swipe or type is PIN/password/pattern).Is there a way to detect this state?My goal is to unlock the phone with my voice instead of using the PIN code, for instance when my hands are busy (or wearing gloves!).So I need to detect that the phone is asking for swiping or entering my PIN code.I cannot find a variable holding the state of the screen (besides on and off), or the app running (is there even a specific app running when asking for PIN?).Maybe I can detect the lock screen background image or some other indirect way of finding out if the screen is locked.Another alternative to reach my voice unlock goal would be to require an action from the user. For instance long press on a hardware button (but I did not find this in tasker either).Thanks!
It looks like the plug in 'secure settings' has a feature to enable the lock screen. Perhaps use this instead of the phones lock screen. Something like--
Screen off ----- enable lock screen / %Lock = 1
Screen on --- if %Lock = 1 then. Disable lock screen / do voice input..
Or something like that any way... just a thought...
Rich...
The one thing you could try is turning off the key lock with secure settings. It has been known to cause problems..
Rich...
> Ok, I can try to unlock the phone for a few seconds and relock it if the password is wrong.
> Though it looks like it would be a pretty big security hole.
Sorry, I meant the key guard.. it most likely is not the problem but it is a easy place to start.. and i am not sure what to try after that.. :(
Ok, two profiles:
Profile: Display Locked:
State: Display State Off
Variable Set: %Display_Locked = 1
Profile: Display Unlocked
Event: Display Unlocked
Variable Set: %Display_Locked = 0
This works for me, because my devices are immediately locked when switched off. Might be different if people have a lock delay configured.
A2: Java Function [ Return:%Status_Locked Class Or Object:kgm Function:inKeyguardRestrictedInputMode
{boolean} () Param: Param: Param: Param: Param: Param: Param: ]
Variable %Status_Locked will contain true or false
I launch this task on Event -> Variable Set -> %SCREEN