
Tasker - Execute flow(s)
Moderator: Martin
Tasker - Execute flow(s)
In order to make things work, I bought Tasker and Tasks2 so I can use Tasker on my GearS3. However I prefer Automagic and would like to use Tasker as a workaround. How can I execute Automagic flows with Tasker? Thanks for the help 

Re: Tasker - Execute flow(s)
Do you try Tasks2 with automagic Plugin trigger/action? You need to replace variable as needed. So far, I haven't found any tasker plugin yet that can't be used by automagic.
Without additional plugin, tasker can launch shortcut via Send Intent. But it is quite difficult, as you need to dig down to the activity and find the matching parameter. I tried to check automagic intent, tested some of them, struggle for several minutes, still haven't found a way to execute it via intent. Maybe Martin can provide us the parameter, and which class name to be invoked. (I think it is ShortcutReceiverActivity or TRIGGER_SHORTCUT)
But if you can install Autoshortcut Plugin, then tasker can use that to launch shortcut to flow from Automagic. Of course, you need to set Shortcut Trigger to the flow you wanna execute.
==========
While the vice versa, for Automagic to execute task from tasker is quite easy. There is Action Launch Shortcut, to build the shortcut directly to the task. (or even detect shortcut from other app). Strange right? Something Automagic alone can do so easily; Tasker which is "so powerful", but still need additional plugin to do a very basic action.
Without additional plugin, tasker can launch shortcut via Send Intent. But it is quite difficult, as you need to dig down to the activity and find the matching parameter. I tried to check automagic intent, tested some of them, struggle for several minutes, still haven't found a way to execute it via intent. Maybe Martin can provide us the parameter, and which class name to be invoked. (I think it is ShortcutReceiverActivity or TRIGGER_SHORTCUT)
But if you can install Autoshortcut Plugin, then tasker can use that to launch shortcut to flow from Automagic. Of course, you need to set Shortcut Trigger to the flow you wanna execute.
==========
While the vice versa, for Automagic to execute task from tasker is quite easy. There is Action Launch Shortcut, to build the shortcut directly to the task. (or even detect shortcut from other app). Strange right? Something Automagic alone can do so easily; Tasker which is "so powerful", but still need additional plugin to do a very basic action.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Tasker - Execute flow(s)
Hi,
You could also use broadcast intents to send information from Tasker to Automagic:
In Automagic you can define a trigger General Broadcast and select an action of your choice, for example automagic. Automagic can extract data of the sent extras or you could also use variable data_string in Automagic. I recommend to just add a condition Debug Dialog to the flow to see what's available by default.
In Tasker you can use an action Send Intent, set the same action and set some value in the Data field. Also select Target Broadcast.
Regards,
Martin
You could also use broadcast intents to send information from Tasker to Automagic:
In Automagic you can define a trigger General Broadcast and select an action of your choice, for example automagic. Automagic can extract data of the sent extras or you could also use variable data_string in Automagic. I recommend to just add a condition Debug Dialog to the flow to see what's available by default.
In Tasker you can use an action Send Intent, set the same action and set some value in the Data field. Also select Target Broadcast.
Regards,
Martin
Re: Tasker - Execute flow(s)
Ah, thanks for the reminding about General Broadcast. I know it for the execute flow workaround, but completely forgot it here.
But unfortunately this only work for Automagic. Tasker still can't create generic shortcut activity just like automagic can.
To execute flow from tasker (with additional parameter)
==========
Tasker - Send Intent
Action : automagic.yourflowname
Package : ch.gridvision.ppam.androidautomagic
Target : Broadcast Receiver
If you need parameter/variable get transferred, put them in the Extra, there are 3 available. Should be enough, but if you needed more, you can arrange your variable in list format.
param1: hello
param2: %yourtaskervariable
==========
At Automagic flow, add trigger : General Broadcast to the flow you want to call from tasker.
Action : automagic.yourflowname
If you use parameter, at the Access Intent Extra, put
value1 = getString("param1");
value2 = getString("param2");
==========
Action : automagic.yourflowname can be anything, just make sure it is unique and not similiar to any other usual broadcast. One of the naming convention will be automagic + yourflowname (without space), ex : automagic.openinchrome
param1 and param2 can be other name, just make sure it is the same name at getString().
%yourtaskervariable is any variable at tasker
value1 and value2 can be other name too, these are the variables available at automagic. You can name it as param1 dan param2 as well.

To execute flow from tasker (with additional parameter)
==========
Tasker - Send Intent
Action : automagic.yourflowname
Package : ch.gridvision.ppam.androidautomagic
Target : Broadcast Receiver
If you need parameter/variable get transferred, put them in the Extra, there are 3 available. Should be enough, but if you needed more, you can arrange your variable in list format.
param1: hello
param2: %yourtaskervariable
==========
At Automagic flow, add trigger : General Broadcast to the flow you want to call from tasker.
Action : automagic.yourflowname
If you use parameter, at the Access Intent Extra, put
value1 = getString("param1");
value2 = getString("param2");
==========
Action : automagic.yourflowname can be anything, just make sure it is unique and not similiar to any other usual broadcast. One of the naming convention will be automagic + yourflowname (without space), ex : automagic.openinchrome
param1 and param2 can be other name, just make sure it is the same name at getString().
%yourtaskervariable is any variable at tasker
value1 and value2 can be other name too, these are the variables available at automagic. You can name it as param1 dan param2 as well.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.