Page 1 of 1

how does automagic work when phone is locked

Posted: 17 Aug 2019 20:10
by tsolignani
Let's say I make a time triggered flow.

What happens wether the trigger arises when the phone is locked?

F.i., a flow to send an SMS later at a certain time.

Thank you.

Re: how does automagic work when phone is locked

Posted: 18 Aug 2019 09:04
by Desmanto
If the action is not blocked by any special API (android) or doesn't require the screen to be on, it should be running fine. I have time trigger flow all day and all execute just fine. The action range from speech output, restart router, backup files, find location and calculate distance and many others.

Send SMS should be working fine, but it can be blocked in some ROM. Make a simple try and error and see if the SMS is sent or not. For some other action that require screen on (all control UI related flow), example send Whatsapp, then you have to turn on the screen first, unlock, do all the stuff and then screen off again.

Re: how does automagic work when phone is locked

Posted: 21 Aug 2019 06:43
by tsolignani
Thank you.

I need to unlock then, many flows regards updating WhatsApp statuses.

I wonder how do I unlock.

I have a not rooted note 9.

And I cannot find any action to unlock in Automagic.

Thank you.

Re: how does automagic work when phone is locked

Posted: 21 Aug 2019 17:33
by Desmanto
You have to grant Automagic device admin permission first. This makes you can't uninstall Automagic as usual uninstall, have to disable the device admin again first if you plan to uninstall.

Then you can use action Set Keyguard state : viewtopic.php?f=5&t=6856
Set it to off, then action turn on screen, do the Control UI stuff, set keyguard state on again, use Control UI lockScreen() to turn off the screen after finish. This ensure you can still unlock the device using fingerprint the next time you need to use your phone.
At times, you might need to use Action Dismiss Slide to Unlock Keyguard.

Re: how does automagic work when phone is locked

Posted: 24 Aug 2019 08:38
by tsolignani
Thank you. I'll try and see if I understand how to make it work.