Page 1 of 1
Keyguard locked condition
Posted: 30 Jan 2015 10:59
by sambarlick
Hi,
I'm having issues with the keyguard locked condition. Automagic doesn't seem to read the state.
Anyone else having issues?
Sam
Re: Keyguard locked condition
Posted: 30 Jan 2015 11:17
by Martin
Hi Sam,
I've not seen this behavior yet.
What Android device, version and lock screen type (Swipe, PIN, ...) are you using? Custom ROM?
Does the condition always evaluate to true or always to false?
Regards,
Martin
Re: Keyguard locked condition
Posted: 30 Jan 2015 11:39
by sambarlick
Hi Martin,
Thanks for replying.
I'm running Android 4.4.4 on a HTC one m8, stock but unlocked.
I use automagic to change the state between pin and none.
I use the condition keyguard locked to check if automagic has successfully changed the state from pin to nothing or nothing to pin.
I have noticed a few times that automagic didn't seem to read the current state properly. So I did a test. The condition always replies with the condition false even if I have the keyguard active.
Sam
Re: Keyguard locked condition
Posted: 30 Jan 2015 15:42
by Martin
Hi Sam,
Unfortunately I don't have an m8 for tests but the condition seems to work on an older HTC device in my tests.
Maybe I'm testing under different conditions. At what point in time are you executing the condition, immediately after the action Set Lock PIN/Password has been executed or at another point in time? Is the screen already off when you execute the flow that sets or removes the PIN?
What happens when you execute the following flow:
-trigger <none>
-action Sleep: 10s
-condition Keyguard Locked
--> true: -action Vibrate: Pattern 4 (short)
--> false: -action Vibrate: Pattern 3 (long)
1) set lock screen to PIN (either manually or using Automagic)
2) execute the flow manually
3) lock the device within the first 5 seconds (you can also turn the screen on again to ensure that the PIN entry or the keyguard is showing)
4) wait until the vibration is executed
Do you get a short or long vibration?
Martin
Re: Keyguard locked condition
Posted: 31 Jan 2015 00:37
by sambarlick
Hi Martin
I ran the flow that you suggested and followed the steps. The vibration pattern reflected the keyguard state when the screen was off, both when pin was active and and when no lock screen was active.
It seems I miss understood the use of the condition.
I can email you the flow of you like. The reason I was originally using the condition was because I noticed automagic didn't always deactivate the lockscreen when flow was executed.
Is their a condition I can use to check lockscreen state whilst the screen is on?
Sam
Re: Keyguard locked condition
Posted: 31 Jan 2015 07:34
by Martin
Hi Sam,
I see, you want to check the current lock screen setting, more or less the value that's shown in system settings->Security->Screen lock (None, Pattern, PIN or Password)?
I think that there's no official API to query this setting since it's part of the lock screen settings and not the regular settings database. However there is a way to query whether the lock screen is secure (PIN, Password) or not (None, Swipe). Maybe this would work for your case. Let me add a new condition for this.
Please send the flow to
info@automagic4android.com so I can make some experiments.
Martin