Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Setting up an Intent #330

Open
mihawk90 opened this issue Mar 8, 2020 · 4 comments
Open

[Question] Setting up an Intent #330

mihawk90 opened this issue Mar 8, 2020 · 4 comments
Labels
Difficulty 1 Good for Contributor: Difficulty Level 1 feature request Proposal for new features

Comments

@mihawk90
Copy link

mihawk90 commented Mar 8, 2020

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.

@glimmerwell
Copy link

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!

@renyuneyun
Copy link
Owner

renyuneyun commented Jan 3, 2021

@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).

@renyuneyun renyuneyun added feature request Proposal for new features Difficulty 1 Good for Contributor: Difficulty Level 1 labels Jan 3, 2021
@glimmerwell
Copy link

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!

@OliveiraHermogenes
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty 1 Good for Contributor: Difficulty Level 1 feature request Proposal for new features
Projects
None yet
Development

No branches or pull requests

4 participants