Help Receiving Intent

405 views
Skip to first unread message

Paul Whiteley

unread,
May 24, 2014, 4:06:14 AM5/24/14
to tas...@googlegroups.com

I am trying to send some data (plain text) from an appinventor app to tasker or an app created with tasker.

Can anyone help with some questions?

1 Is the below statement the same for apps created with tasker?

Receiving Intents

Tasker allows you to receive a large range of intents, sent by apps or the system, using the Intent Received event in the System category.

For each event you create, Tasker sets up a corresponding Intent Filter object.

2 I think the only way I can send intent from an appinventor app is to use the activity starter.
as this specifies a Package and a class, With point 3 below does this mean it cant be done.

Limitations

  • Tasker can only receive intents which are sent to broadcast receiver components, not to activities or services.
  • some intent senders require that a corresponding intent filter is specified statically (i.e. in an Android Manifest). Those intents cannot be received.
  • intents which are broadcast with a specification of a particular package component to receive it cannot be received.

App inventor activity starter has the following options to play with.

If anyone has the values I kneed that would be a big help, but more importantly is it possible or not ?





With the values I have tried the app opens and I am trying to receive the data using the variable %intent_data but this doesn't work

Pent

unread,
May 24, 2014, 6:39:12 AM5/24/14
to tas...@googlegroups.com
No, starting an activity will not trigger Intent Received.

I'm surprised that App Inventor can't send normal intent broadcasts.

You could create an intermediate app with Tasker which does a Send Intent and start that from App Inventor
I guess. Messy.

Pent

Paul Whiteley

unread,
May 24, 2014, 11:46:16 AM5/24/14
to tas...@googlegroups.com
Thanks Pent
But it's app inventor that is creating the text to send, I would still have to send the text to the intermediate app first wouldn't I ?

Pent

unread,
May 24, 2014, 12:12:12 PM5/24/14
to tas...@googlegroups.com
You lost me there. The solution I proposed was to send to the intermediate app first, yes. If you're
sure it can't send broadcasts, which seems strange to me.

Pent

Paul Whiteley

unread,
May 24, 2014, 7:29:25 PM5/24/14
to tas...@googlegroups.com
Now You have lost me. Im no expert in tasker or App inventor so please bear with me.

I create a Tasker app and start it with Appinventor thats ok an easy enough
As I start the app, app inventor sends the data to it, How? do I use a data URL or an extra key?
And what do I put in the Tasker app to receive the data and put it in a variable so I can use it.
Thanks again for your time.

Pent

unread,
May 25, 2014, 2:16:36 AM5/25/14
to tas...@googlegroups.com

I create a Tasker app and start it with Appinventor thats ok an easy enough
As I start the app, app inventor sends the data to it, How? do I use a data URL or an extra key?

Sorry, should have mentioned that. Any data you specdidy in App Inventor should be accessible
in the kid app via %launch_data in the launch task that you specify in the kid config before
generating it.
 
And what do I put in the Tasker app to receive the data and put it in a variable so I can use it.

You use Send Intent in the kid and Intent Received in Tasker.

I would flash up the data in the kid app to make sure you're getting something there first.

Pent

Brandon Horwath

unread,
May 25, 2014, 3:08:10 AM5/25/14
to tas...@googlegroups.com
in the kid app via %launch_data in the launch task that you specify in the kid config before
generating it.

Gold... I've been looking for this on tasker.dinglisch.net but haven't been able to find it.

Do you have any reference docs regarding this?

Paul Whiteley

unread,
May 25, 2014, 4:07:24 AM5/25/14
to tas...@googlegroups.com
Thanks Pent
I am getting there.
I have started the Kid app and sent data to it. Flashed it to confirm.

That Is exatly what I was trying to do, But to complete what you suggested to get the data into Tasker, Im not there yet.

I included a send intent to trigger the intent received. To test i left all the feilds blank apart from data i used hello world and target set to broadcast receiver. just to see if i could trigger the event
In Tasker i set an intent received event, again for testing I left the fields empty, im using a beep task just to see if it triggers

All failed

So I would think I need some details in the action fields so tried action view action main
Nothing seems to work?

Pent

unread,
May 25, 2014, 4:38:22 AM5/25/14
to tas...@googlegroups.com
It's in the app creation section.

Pent

Pent

unread,
May 25, 2014, 4:45:19 AM5/25/14
to tas...@googlegroups.com

I included a send intent to trigger the intent received. To test i left all the feilds blank apart from data i used hello world and target set to broadcast receiver. just to see if i could trigger the event
In Tasker i set an intent received event, again for testing I left the fields empty, im using a beep task just to see if it triggers

You can't register to receive 'any intent', I should probably add some action validation there.Pick a random action 'my.test.action' and put it in both the Send Intent and
Receive Intent field.

Your 'hello world' should be then available in the invoked task via %intent_data (as described in the Intents section of the userguide).

Pent

Paul Whiteley

unread,
May 25, 2014, 5:59:57 AM5/25/14
to tas...@googlegroups.com
Still not triggering the event I must be missing some thing Do I have to use a specific package

Paul Whiteley

unread,
May 25, 2014, 6:06:47 AM5/25/14
to tas...@googlegroups.com
If I put Hello world in the data  the event won't trigger. if I leave the data empty it will trigger.

Paul Whiteley

unread,
May 25, 2014, 10:49:32 AM5/25/14
to tas...@googlegroups.com
Bingo I have It
I use a the same action in both the send intent task and the intent receive event.
I use an extra to send the date using this format
Extra
intent.data:Hello World

The data is available in Tasker as %intent_data

Thanks again Pent for all your help.

Pent

unread,
May 25, 2014, 11:11:31 AM5/25/14
to tas...@googlegroups.com
Yes, specifying data in an intent means the listener has to match it's URI scheme
if I remember right.


I use an extra to send the date using this format

Good idea.

Pent

Reply all
Reply to author
Forward
0 new messages