is it possible to instruct Google Play Music app to play a certain song?

1,252 views
Skip to first unread message

Sinan Ghareb

unread,
Sep 5, 2013, 4:27:26 PM9/5/13
to tas...@googlegroups.com
Like the title says. I would like to have AutoVoice capture the song name, which I can right now, and then pass that to Google Play Music app.
Either through intent or a shell command.

I was looking at the databases where the app stores all the tracks info, and I found a database that has the file name and all sorts of other attached info on that database.
I did find the pocketables tutorial on how Andreas achieved something similar. The only problem is he is using tasker to list the songs in a folder and then matching that to the AutoVoice result.
He then just opens the music file and that would load his default player.

But the way I'm planning on is having it more dynamic and not restricted to files in a folder since the Play Music app store the files in cached folders somehow.
Not only that, if the setting on the app restrict caching, I won't be able to play anything from the cache folder as it will be empty.

Any ideas? is there a list of intents that can we go through? or is there a way to see what app/any app's intent are?

Thanks

Matt R

unread,
Sep 5, 2013, 5:59:14 PM9/5/13
to tas...@googlegroups.com
I use this: https://play.google.com/store/apps/details?id=com.electricsheep.asi to look at app manifests which contain the intents an app accepts.

Matt

Sinan Ghareb

unread,
Sep 5, 2013, 6:53:06 PM9/5/13
to tas...@googlegroups.com
Thanks Matt,
I have tried the app, however when I try to view the information about Google Maps app, I don't see the intent for sending a navigation query like the one I found
on pocketables http://www.pocketables.com/2013/06/how-to-use-google-navigation-from-autovoice.html

Action: android.intent.action.VIEW
Data: google.navigation:q=%avcommnofilter
Target: Set this to Activity

This is just to see if I can find an intent that I know it worked for me, but I didn't.
Or maybe it's there but I just don't really know how to get it or use it.

Jay M

unread,
Sep 6, 2013, 6:36:06 AM9/6/13
to tas...@googlegroups.com

This will come in handy thanks for sharing 👍

Jay M

On 5 Sep 2013 22:59, "Matt R" <matthew.r...@gmail.com> wrote:
I use this: https://play.google.com/store/apps/details?id=com.electricsheep.asi to look at app manifests which contain the intents an app accepts.

Matt

--
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 http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/groups/opt_out.

Sinan Ghareb

unread,
Sep 6, 2013, 4:25:24 PM9/6/13
to tas...@googlegroups.com
Would you be so kind and just provide a small how to read the intents and how e can utilize them? That would be very much appreciated.
I'm no Android Developer, so I don't know how deal with this data.

I'm a webdeveloper (HTML, CSS, and PHP). So if you ever need help in this area, you know how to contact :)


On Thursday, September 5, 2013 3:59:14 PM UTC-6, Matt R wrote:

Matt R

unread,
Sep 6, 2013, 7:27:44 PM9/6/13
to tas...@googlegroups.com
Not sure if we're using the same version of Google Maps, but in that app I linked to, if I select apps then scroll down to Maps and pick that one of the buttons is AndroidManifest.  Select that and all the way at the bottom almost is an intent that reads:

<intent-filter>
 <action
 android:name="android.intent.action.VIEW"/>
 <category
 android:name="android.intent.category.DEFAULT"/>
 <data
 android:scheme="google.navigation"/>
</intent-filter>

Matt

Sinan Ghareb

unread,
Sep 7, 2013, 2:15:39 PM9/7/13
to tas...@googlegroups.com
Oh, that's some very helpful information. The question now is how one would know the structure of the Data value? In the case of google maps it was :q=%avcommnofilter

Thank you for your help

Matt R

unread,
Sep 7, 2013, 11:13:57 PM9/7/13
to tas...@googlegroups.com
That's the million dollar question that I have no answer to. Let me know if you find out...

Matt

Sinan Ghareb

unread,
Sep 14, 2013, 6:53:27 PM9/14/13
to tas...@googlegroups.com


On Saturday, September 7, 2013 9:13:57 PM UTC-6, Matt R wrote:
That's the million dollar question that I have no answer to. Let me know if you find out...

Matt

Pent, any insight on this? how do you -as a developer- know what data an intent accepts?

Michael Burke

unread,
Sep 14, 2013, 7:38:08 PM9/14/13
to tas...@googlegroups.com
use utter! instead of tasker cause all you have to do is say stream <insert song title here

--

Sinan Ghareb

unread,
Sep 15, 2013, 2:10:50 AM9/15/13
to tas...@googlegroups.com
That's good to know, and thank you for the suggestion. However, yet another app?! ahh...
Also, knowing what intents an app has, and knowing what data to sent to; would be ultra powerful.
We might be able to to a third party app to do the music search. But should we install an app for every little thing? I personally don't think so.
I like to do things natively. And I only resort to a third party solution when all possibilities are exhausted.
Reply all
Reply to author
Forward
0 new messages