Failed to excute broadcast task

173 views
Skip to first unread message

Phil Bilton

unread,
Nov 16, 2016, 1:23:44 PM11/16/16
to Tasker
Hi,
Hopefully pent see's this and can advise.

I have an app called watchmaker that has built in tasker support. I have a action within that app that sends an intent to run a task.
The task name is called 'send intent'

This task Does Not exist. Instead I'm trying to intercept that intent and run a different task.

This is because I'm trying to build a stand alone app that requires me to intercept these intents to run my tasks when the user needs them.

In my profile I have an intent received profile with
net.dinglisch.android.tasker.ACTION_TASK
and it is set to highest.
Yet this never gets triggered.

Nothing shows up in the logs but I do get the error message 'failed to execute broadcast task.' This is because the task the intent is trying to trigger does not exist which is why I'm trying to intercept it.

But if I change the original task name in Watchmaker to one that does exist then the task runs but not because of my intent received profile.

Any advise would be much appreciated.
Thanks
Phil

Pent

unread,
Nov 17, 2016, 3:46:07 AM11/17/16
to Tasker
Did you set the scheme to 'id' ?

Pent

Phil Bilton

unread,
Nov 17, 2016, 1:50:25 PM11/17/16
to Tasker
I have tried it with 'id' still no joy, same error message.

Pent

unread,
Nov 17, 2016, 2:58:11 PM11/17/16
to Tasker
Without the quotes ?

Works for me with just the action and scheme specified.

Pent

Phil Bilton

unread,
Nov 17, 2016, 4:48:11 PM11/17/16
to Tasker
No quotes, is it literally just id, I don't have access to the original intent, the Dev of watchmaker said it's just a standard intent that is used to action the requested tasks.

Phil Bilton

unread,
Nov 17, 2016, 5:26:43 PM11/17/16
to Tasker
Pent, I've uploaded a video of the intent and then the action being triggered in watchmaker along with the error message.

https://youtu.be/orArEsygQ1Y

Pent

unread,
Nov 18, 2016, 3:03:24 AM11/18/16
to Tasker
The intent looks OK. Are you sure the event isn't activating ? Check the Run Log.

I checked again with different conditions and you're correct in that the 'missing task'
error comes up, but the task for the Intent Received action works without problem.

The reason the Stop parameter doesn't work is that the sending app isn't using
'sendOrderedBroadcast' but 'sendBroadcast' to send the intent. The first one
sends the intent to all the listeners in an ordered way dependent on priority,
and allows any of them to abort it, the second one doesn't.

Pent

Pent

unread,
Nov 18, 2016, 3:10:35 AM11/18/16
to Tasker
I've added some override code to block the handling-as-external-task if there's an Intent Received
that matches with a Stop parameter set (i.e. outside of Android's normal intent handling mechanism).

Pent

Phil Bilton

unread,
Nov 18, 2016, 4:01:41 AM11/18/16
to Tasker
Hi pent, I checked the logs before I made the post when I was trouble shooting as I knew you would ask ;) I've just double checked and nothing shows up.

Pent

unread,
Nov 18, 2016, 4:42:56 AM11/18/16
to Tasker

Hi pent, I checked the logs before I made the post when I was trouble shooting as I knew you would ask ;) I've just double checked and nothing shows up.

Sorry, can't explain why the event doesn't trigger, I tested it on 2 devices here.
For testing I used the FileMagic app, assigning in prefs a Tasker task to be executed when
a file is long-clicked, you could try testing it with that.

Maybe it will be magically fixed with the update with the Stop implementation :-)

Pent

Phil Bilton

unread,
Nov 18, 2016, 5:06:12 AM11/18/16
to Tasker
I hope so :) it would help if the Dev of watchmaker was more responsive but I guess he is quite busy and my issue is not a priority.
It's not a deal breaker if it doesn't work, I'll have to shelve my idea and think of a new app.
I'll let you know once I get the update if it works or not.
Thanks for your help

Phil Bilton

unread,
Dec 20, 2016, 1:54:33 PM12/20/16
to Tasker
Hi pent,

Thank you for the recent update that has helped with this issue. I now have another question if I can.
I have the intent received profile, that starts a task that flashes
%intent_data
%evtprm1
%evtprm2
%evtprm3
%evtprm4
%evtprm5
The app that sends the intent(watchmaker), is asking for a certain task to start, but how does tasker know which one? I was under the impression that the task name it wants to start would of been in the data fields above.
The intent_data flashes a number, but this changes every time I send the intent.

Thanks in advance
Phil

Phil Bilton

unread,
Dec 20, 2016, 5:10:34 PM12/20/16
to Tasker
I found my answer after days of searching Google as the search function in this groups is what it is.
The link is below if anyone else is following this thread after answers.
https://groups.google.com/forum/m/#!searchin/tasker/Intent/tasker/GaN8aWKDhpE

Thanks again pent!

Reply all
Reply to author
Forward
0 new messages