MacroDroid/Tasker Integration via Plugin #949
Replies: 5 comments 11 replies
|
Hi and thank you for your contribution as usual. First I see your starting a list a feature request, please split them into diffierent posts (as stated in rules of the section: #883). Feedback:
To be Refined
I won't have enough time to dedicate to feature requests until the 4.0.0 is finalized, as I want to dedicate as much time as possible to finish the tutorial rework and bug fixes as quickly as possible, but I will try to keep this one updated to use as a reference for the others and that's something requested several times and never had the time to implements. As stated in the rules, the goal of those Feature Request is to refine a ticket that i will add here once all the details are defined: Klick'r Requested Features Implementations (view) |
|
Demo for the upcoming "External Actions" feature Screenrecorder-2026-07-09-14-37-15-704.mp4(Ignore the fact that Klick'r is actually receiving a blank screen in media projection. It doesn't affect the demonstration, and is the only way to successfully record screen simultaneously.) Please share feedback about it. Would love to hear any feedback at all. As usual, WIP code is visible at my fork's branch. The Start/Stop Scenario is another feature in pipeline, but I'm still experimenting with how to handle Media Projection behavior, and will be sharing its demos once ready. And that's when I'll publish technical summary of how the internal code achieves all this, and create the PR as well. |
|
@Nain57, have a look at the demo. Any thoughts on the integration method? I personally think it's pretty user friendly. I expect to finish developing it by tomorrow, and that's when I'll share demo for the rest of the plugin's functionality as well. How many further weeks do you expect the tutorial rework for 4.0 to take? I should open the PR only after 4.0.0 is stable, right? I'll be working on more features till that time :) |
|
Here's the demo for Launch Scenario. I've tested a lot of edge cases myself, and went with this solution. When a permission prevents Klick'r from showing Media Projection in background, a notification fallback is shown instead after 1.5 seconds of waiting and no-response from helper process. Plus, the Don't Kill My App popup the next time user opens Klick'r app. The demo first shows how an attempt through fallback notification usage would look like, and then how another attempt with permission already given would look like. There's no code for directly checking for whether permission to open from background is given or not, since it's not an android-general restriction but very diversely implemented individual restrictions from various phone manufacturers. Screenrecorder-2026-07-12-13-40-16-410.1.mp4There's also stop scenario functionality that works exactly how you'd expect it to, although not included in this demo. |
|
Restored back after a month of invisibility as my account was false-positively flagged |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently working on it, and defining a Locale plugin within Klick'r seems extremely promising. The initial aim was to allow macrodroid/tasker or other automation apps to start/stop specific scenarios and integrate. Allowing them this access through intents was very user unfriendly, exactly how intents tend to behave. But early testing versions of the Locale plugin seem to work well, not a security concern, and user-friendly. A normal user who has basic MacroDroid/Tasker macro creation and Klick'r scenario creation knowledge would be able to carry it out with no problems. The ScenarioID and any backend info is not required by the end user, and setup remains minimalist.
Examples
Drawbacks
Future Direction
There can be a new type of action (currently assuming the name "External Action" for it) that invisibly allows the scenario to invisibly communicate something to MacroDroid/Tasker, where it can be added as a trigger to a Macro. Each External Action would need to carry a specific user-defined name and there can be as many of them and those of the same name can be used as many times as needed, just like counters/variables/functions.
Examples
FAQs
Q1: What API standard is used to integrate with automation tools (Tasker/MacroDroid), and is there developer documentation?
A: We implement the open Locale Plugin API, which is the industry standard natively supported by all major Android automation hosts (Tasker, MacroDroid, LlamaLab Automate).
Q2: What is the exhaustive list of features and operations that Klick'r exposes?
A: The integration supports three operations:
LocalePluginOperation.LAUNCH): Launches a specific scenario. Supports both Smart and Dumb scenarios. Configured and serialized using LocalePluginConfiguration.kt. Dumb scenarios are fetched via Room from the localDumbDatabase, and Smart scenarios fromScenarioDatabase.LocalePluginOperation.STOP): A global stop setting to immediately halt the currently running scenario. Configured instantly without a GUI via LocalePluginStopConfigurationActivity.kt.com.twofortyfouram.locale.intent.action.REQUEST_QUERY). When the automation host queries Klick'r, ExternalActionEventQueryReceiver.kt matches the configured name against the fired name inside the pass-through bundle data (net.dinglisch.android.tasker.extras.PASS_THROUGH_DATA).Q3: How are setting configuration payloads secured against local spoofing/forgery?
A: Because
com.twofortyfouram.locale.intent.action.FIRE_SETTINGis an open broadcast, a malicious local app could send spoofed intents to start or stop random scenarios. To prevent this, payloads are signed with a private key stored inside the hardware-backed Android KeyStore:SignedLocalePluginConfigurationand returned to the host.Q4: How is the system Media Projection consent warning handled, and can it be bypassed?
A: System Media Projection security requirements cannot be bypassed silently, but the implementation minimizes user intervention:
replaceSmartScenarioWithCurrentProjection()in LocalService.kt updates the active scenario ID and switches the target scenario without prompting the user, reusing the existing casting token.stopScenario()(manually or via plugin) executesstopAndWait()which terminates the projection proxy and stops the screen capture session. Keeping projection alive when no scenario is running is not natively supported in Klick'r's current session-coupled architecture.Q5: When can a user expect to NOT see the media projection prompt, or the launch scenario failing to do anything?
A: There are specific scenarios where the media projection prompt cannot open, or the launch fails:
1.5-secondtimeout (DIRECT_LAUNCH_FALLBACK_DELAY_MS), Klick'r registers a launch failure and posts the notification fallback.ScenarioActivityconsumes the failure state and displays theBackgroundLaunchTroubleshootingDialogdialog, directing the user to the Don't Kill My App guide to configure battery optimization exemptions.scenarioChangeMutex). It will safely stop the running scenario first before attempting the replacement.All reactions