I want to launch a tasker task from tasker itself with an intent. Because Send Intent allows for only two extras, I've been trying via the shell.
My command is:
am broadcast -a net.dinglisch.android.taskerm.ACTION_TASK --es "task_name" "IntentToast" -- "varNames" "myvar" --es "varValues" "Hello_Android"
This gets me an output that describes the broadcast and shows the broadcast as complete. The return is 0, and it reports no error. The task IntentToast just contains an alert to toast %myvar, but it does not run. Tasker is set to allow external control.
One of the devices I need this to run on is on gingerbread, with no sign of ICS or jellybean, or I'd just use the Receive Intent context, which does this nicely.
Is there something I'm missing in my command?
am broadcast -a net.dinglisch.android.taskerm.ACTION_TASK -d id:ghtddfghbvg --es "task_name" "IntentToast" --es "varNames" "myvar" --es "varValues" "Hello_Android!" --es "version_number" "1.1"
Matt
Checked, not chicken
Matt
Matt
If you want to be able to choose the task when sending, pass the task name as an extra and use the perform task action in your receiving task.
To pass arrays the best way is to JSONify them and use AutoTools to pull them to an array. There is a Tasker tutorial on how to do this.