Easer
Easer copied to clipboard
[Question] Setting up an Intent
I'm pretty sure this is probably not the right place to ask, but I don't know where else, so here goes.
I'm trying to get NetGuard's eu.faircode.netguard.DOWNLOAD_HOSTS_FILE
intent to work with Easer, but either I'm not getting the concept at all and/or I don't find the right way and/or something is wrong.
I created a profile and tried using various Operations. First I tried Launch App
, which from what I understand would have been the wrong one, but at least I got a Failed: launch_app
in the activity history.
So from looking around the GitHub issues I figured Send Broadcast
would be the correct Operation to use. But not matter whether I try Action
(which was the only one that made sense to me), Category
, Type
, or Data
, none of them actually update the hosts file (there's a timestamp of the last download in NetGuard). After triggering the profile, each trigger appears in the activity history. but with no additional information.
I triggered the profile manually after each change with the long-press option, so no script/condition/event was involved.
Unfortunately I couldn't find any mention of intents in the documentation. Any help is appreciated.
Hi, I have this exact same situation. I am trying to get the excellent no-root firewall NetGuard (https://github.com/M66B/NetGuard) to automatically update the host file on my Android phone once a day. I was able to do it using Tasker (paid) on a previous phone, following these instructions I found:
"Create a new task. System > Send Intent. Set the "Action" to eu.faircode.netguard.DOWNLOAD_HOSTS_FILE and set the "Target" to Service. Then add this task to whatever Profile you want to trigger it."
Is there a way to do this with Easer?
Thanks!
@glimmerwell Thanks for the information. It points out the exact thing to do -- allow selecting a target component. The "send broadcast" / "start activity" / "start service" Operations are the right thing to look for, but unfortunately this is not currently supported. I may investigate some time to that.
--- Summary of TODO
In BroadcastOperation, support selecting target component (service).
Hi renyuneyun, that would be great if you could get Easer to update the latest versions of Netguard's Hosts file! I would guess there are many people who would use it. I will need good exact directions when you get it finished.
Thanks!
I don't use Netguard myself, but I suggest you try the "Execute command" profile with am broadcast --user 0 -a eu.faircode.netguard.DOWNLOAD_HOSTS_FILE eu.faircode.netguard
, as per #431.