Created
November 9, 2023 14:35
Revisions
-
ByteSizedMarius created this gist
Nov 9, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ // https://adguard.com/kb/adguard-for-android/solving-problems/tasker/ // https://pub.dev/packages/android_intent_plus import 'package:android_intent_plus/android_intent.dart'; Future<void> setAdguard(bool active, {bool quiet=false}) async { AndroidIntent intent = AndroidIntent( action: active ? "start" : "stop", componentName: "com.adguard.android.receiver.AutomationReceiver", package: "com.adguard.android", arguments: { "password": "<password set in adguard settings>", // If false, adguard may send a toast, confirming the action "quiet:" quiet, }, ); await intent.sendBroadcast(); }