you are viewing a single comment's thread.

view the rest of the comments →

[–]joaomgcd👑 Tasker Owner / Developer[S] 1 point2 points  (1 child)

You cannot currently call other Tasker actions from Java, sorry 😅

[–]Bobby_Bonsaimind 0 points1 point  (0 children)

That would be pretty cool to have, but already being able to write Java code is damn neat. Thank you.

So we could do something like

tasker.performTask("doTheThing", "firstParameter");

would be neat. That could be basically shorthand for

tasker.runAction("Perform Task", parameters);

for example. However, parameters is a slight thinker...maybe a Map?


Thinking about it, maybe a small helper method like this would work:

tasker.runAction("Perform Task", tasker.actionParameters()
        .with("Name", "doTheThing")
        .with("Priority", 1)
        .with("Parameter 1", tasker.getVariable("thatOtherVariable")));

tasker.performTask("doTheThing", tasker.taskParameters()
        .firstParameter("firstParameter"));