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:cloudflare — switches to a particular server by its short name;
NOTE: the full list of supported server names can be found inside AdGuard DNS settings under the "Secure DNS" tab
server:184.108.40.206,220.127.116.11 — switches to any custom DNS server;
server:sdns://AQIAAAAAAAAAFDE3Ni4xMDMu... (full string is too long) — switches to any custom DNS server via DNS-over-HTTPS, DNS-over-SSL or DNSCrypt;
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!