one thing I haven't found clearly is how to trigger a flow when accessing a URL
use case: don't allow me to enter facebook.com if I'm on working hours
I've seen this is possible for some apps like this one: https://play.google.com/store/apps/deta ... lock&hl=en
So I wanted to check if it is possible through Automagic as well
The nearest related trigger I have found is this one https://automagic4android.com/trigger_v ... ed_en.html but I don't think it does what I need
If it is possible, can I get access to the complete URL? so I can do more logic based on the url
Is it possible to trigger a flow when accessing a URL?
Moderator: Martin
Re: Is it possible to trigger a flow when accessing a URL?
Trigger: UI Event
Event type: text changed
Package: select the browser you use from the list
Contains text: facebook.com
Action: Control UI
Condition: Expression
The above flow will recognize whenever you type facebook.com or that text is displayed on the browser screen.
Next optionally you can use,
Action: Control UI
To return to the home screen when ever you type facebook.com on the browser.
Event type: text changed
Package: select the browser you use from the list
Contains text: facebook.com
Action: Control UI
Code: Select all
text=getTextInActiveWindow()
Code: Select all
contains(text, "facebook.com")
Next optionally you can use,
Action: Control UI
Code: Select all
home()
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted