Many people choose Android because they like having the ability to customize things and want to control their device completely. And it's totally normal if some of AdGuard users are not satisfied with its default behavior. Let's say, you want protection to stop when a certain app is launched, and then restart it again when the app is closed. This is a job for a tasker app.
Thanks to this interface, any app can send a special message (called "intent") that contains the name of the action and some additional data, if needed. AdGuard will look at this intent and perform the required actions.
Wouldn't it be a bit dangerous, you might ask — to let some random apps manage what AdGuard does? It would, and that's why a password is sent along with the intent. This password will be generated by AdGuard automatically, but you can, of course, change it at any tyme.
So, ready to get your hands dirty? Here are actions that, when included in the intent, will be understood by AdGuard:
start — starts the protection, no extra data is needed;
stop — stops the protection, no extra data required;
pause — pauses the protection. The difference between this and
stop is that a notification will appear that restarts the protection when you tap on it. No extra data required;
update — checks for available filter and app updates, no additional data is needed;
dns_filtering — turns DNS filtering on and off. Requires an extra flag:
enable:false — enables or disables DNS filtering, accordingly.
dns_server — switches between DNS servers, you need to include additional data:
server:adguard dns — switches to AdGuard DNS server;
NOTE: the full list of supported provider names can be found inside AdGuard DNS settings under the "Custom DNS settings"
server:custom — switches to the previously added server named
server:tls://dns.adguard.com — creates a new server and switches to it if the previously added servers and providers don't contain a server with the same address. Otherwise, it switches to the respective server. You can add server addresses as IP ( regular DNS),
sdns://… (DNSCrypt or DNS-over-HTTPS),
https://… (DNS-over-HTTPS) or
server:126.96.36.199, tls://188.8.131.52 — creates a server with comma separated addresses and switches to it. When adding a server via
server:184.108.40.206, tls://220.127.116.11, the previously added server is removed.
server:system — resets DNS settings to default system DNS servers.
proxy_state – enables/disables the outbound proxy. Requires an extra flag:
enable:false — activates or disactivates the outbound proxy, accordingly.
proxy_default – sets the proxy from the list of previously added ones as default. You need to include additional data:
server:[name] – where
[name] is the name of the outbound proxy from the list.
Don't forget to include the password as an extra and mention package name and class! You need to do so for every intent!
To perform a task without showing a toast, add an additional EXTRA