problem with act set keyguard state and con keyguard locked

Post your questions and help other users.

Moderator: Martin

Post Reply
kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

problem with act set keyguard state and con keyguard locked

Post by kamil_w » 13 Nov 2014 19:22

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

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

Post by Martin » 14 Nov 2014 14:17

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

kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

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

Post by kamil_w » 15 Nov 2014 06:29

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.

StrayCat
Posts: 31
Joined: 21 Nov 2013 12:51
Location: Ponferrada, Spain

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

Post by StrayCat » 15 Nov 2014 10:06

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.

kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

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

Post by kamil_w » 15 Nov 2014 10:23

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.

Post Reply