Getting all info from a broadcast intent

201 views
Skip to first unread message

Greg

unread,
Jul 29, 2016, 5:17:52 PM7/29/16
to Tasker
Is it technically possible (through Tasker or through other means) to get all of the info sent out through a broadcast intent?

In particular, I'm trying to see what info is in the broadcast intent com.google.android.music.metachanged and I've been able to guess some of the variable names, which come back as %artist, %position, %duration, etc, but is it possible to see a dump of everything that's in the broadcast to see what other info is available? I've checked out the source code and the manifest for the app which haven't been too clear.

Jay M

unread,
Jul 29, 2016, 5:31:43 PM7/29/16
to Tasker

Maybe with the Intent Intercept app


On Fri, 29 Jul 2016, 22:17 Greg, <scott.s...@gmail.com> wrote:
Is it technically possible (through Tasker or through other means) to get all of the info sent out through a broadcast intent?

In particular, I'm trying to see what info is in the broadcast intent com.google.android.music.metachanged and I've been able to guess some of the variable names, which come back as %artist, %position, %duration, etc, but is it possible to see a dump of everything that's in the broadcast to see what other info is available? I've checked out the source code and the manifest for the app which haven't been too clear.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
--

Jay M ︻芫══一

Wayne Longford

unread,
Jul 29, 2016, 7:57:30 PM7/29/16
to Tasker
If you turn on Taskers debug log then you will be able to find the info in there.

What I do is set Tasker to debug to system log and then use an app call 'CatLog' to view and filter the system log.

This is what I got for the intent com.android.music.metachanged

07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %duration
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %currentcontainername
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %artist
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %domain
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %currentsongloaded
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %isforcednextskip
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %preparing
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %rating
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %albumid
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %songid
07-30 00:37:44.719 D/Tasker (1448): 00.37.44#M: add var: %currentcontainertypevalue
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %currentcontainerid
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %playing
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %streaming
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %inerrorstate
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %album
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %local
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %track
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %position
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %supportsrating
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %listsize
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %previewplaytype
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %trackmetajamid
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %issoundad
07-30 00:37:44.729 D/Tasker (1448): 00.37.44#M: add var: %listposition
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %duration
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %currentcontainername
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %artist
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %domain
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %currentsongloaded
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %isforcednextskip
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %preparing
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %rating
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %albumid
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %songid
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %currentcontainertypevalue
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %currentcontainerid
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %playing
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %streaming
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %inerrorstate
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %album
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %local
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %track
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %position
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %supportsrating
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %listsize
07-30 00:37:44.789 D/Tasker (1448): 00.37.44#M: add var: %previewplaytype
07-30 00:37:44.799 D/Tasker (1448): 00.37.44#M: add var: %trackmetajamid
07-30 00:37:44.799 D/Tasker (1448): 00.37.44#M: add var: %issoundad
07-30 00:37:44.799 D/Tasker (1448): 00.37.44#M: add var: %listposition

Greg

unread,
Jul 29, 2016, 10:15:16 PM7/29/16
to Tasker
That's amazing, thanks so much!

Pent

unread,
Jul 30, 2016, 3:42:15 AM7/30/16
to Tasker
You should be able to use action Tasker / Test Tasker / Local Variables to get the list too,
after receiving the intent via Intent Received event.

Pent

Wayne Longford

unread,
Jul 30, 2016, 5:59:25 AM7/30/16
to Tasker
Pent, I know you can get the var values that way, but can you get their names? I couldn't figure that out!

Pent

unread,
Jul 30, 2016, 7:24:44 AM7/30/16
to Tasker

Pent, I know you can get the var values that way, but can you get their names? I couldn't figure that out!

You have it the wrong way around, you get the names that way.

Pent

Wayne Longford

unread,
Jul 30, 2016, 1:28:41 PM7/30/16
to Tasker
Odd. I could swear that I got values instead of names in the past. But just tried again and it works as you suggest!

Pent

unread,
Jul 30, 2016, 3:41:13 PM7/30/16
to Tasker
You can get the value with the double percentage:

Test Tasker / Local Variables -> %vars
Flash, Var1 is %var1, its value is %%var1

Pent

Scott

unread,
Aug 12, 2016, 5:21:38 PM8/12/16
to Tasker
Apologies if I'm missing something obvious, but when I put the action Tasker  > Test Tasker > Local variables in my task and set it to a variable like %intentvars it returns %intentvars. 

If I try %Intentvars it returns 0, and if I try %intentvars() or %intentvars% I get the message Error: %Intentvars() must be a variable or array name. Is there an additional step I need to take before the Test Tasker action?

Wayne Longford

unread,
Aug 15, 2016, 7:13:39 PM8/15/16
to Tasker
Do it like this..

A1: Test Tasker [ Type:Local Variables Data: Store Result In:%intentvars ]

A2: Flash [ Text:%intentvars() Long:Off ]

Scott

unread,
Aug 16, 2016, 4:47:38 PM8/16/16
to Tasker
Thanks Wayne! I was close - once I found out this returned an array I tried using %intentvars() which caused an error. Then once I discovered that %intentvars0 returned something I put in %intentvars0 - 40 to try to catch them all. This method is much easier.
Reply all
Reply to author
Forward
0 new messages