Page 1 of 1

problem with act set keyguard state and con keyguard locked

Posted: 13 Nov 2014 19:22
by kamil_w
Hi,
I have noticed problem with action set keyguard state and condition keyguard locked.

I have some flows.
1. Turning off keyguard when I am entering home.
2. Turning on keyguard when I am leaving home.
4. Turning on Internet when screen is going on and user is present.
So when screen is turning on it checks if device is unlocked. If yes then flow goes to next steps.

It should works like that but on my Samsung Note 3 with root I have problems with it.
1. Turning on keyguard not always works. I suppose that problem is present when screen is off because when today I took my phone from pocket, on statusbar there were info (set by my flow) that keyguard is on, but it was off (there were no prompt for PIN).
2. On second flow there is condition Keyguard Locked and if it is false it should go forward, but flow is ending. I have no idea why.

Re: problem with act set keyguard state and con keyguard loc

Posted: 14 Nov 2014 14:17
by Martin
Hi

It sounds like the keyguard actions have been executed properly (since the condition returns that the keyguard should be on) but the phone ignores the setting that the phone should be locked again. Unfortunately the actions affecting the lock screen are known to not work reliably on Android. To my knowledge no workarounds exist that work on all devices.
You could try to use an action Lock Device after turning the keyguard on. Maybe the phone honors the lock action and properly brings up the lock screen when explicitly asked for.
As an alternative you could try to use the action Set Lock PIN/Password to clear and set a PIN instead of using Set Keyguard State at all.

Regards,
Martin

Re: problem with act set keyguard state and con keyguard loc

Posted: 15 Nov 2014 06:29
by kamil_w
Using Lock device after turning on Keyguard isn't good solution because if I will enter home while I will be using my phone, the screen will go off. It will be annoing.
I will test if "set pin/password" action works better.

Re: problem with act set keyguard state and con keyguard loc

Posted: 15 Nov 2014 10:06
by StrayCat
Hi.

I use a flow pretty same like yours but through "Secure Settings" app. Playing with keyguard without it won't run like spected on both my phones Samsung Galaxy NOTE and LG G Pro 2.

Re: problem with act set keyguard state and con keyguard loc

Posted: 15 Nov 2014 10:23
by kamil_w
Few days ago I was checking if it works with Secure Setting and it wasn't at all. Now I have tried again and this function from Secure Settings works. So I will leave on flow to automatic turn keyguard on/off for few days and will check how it works in practise.