"Music playlist example" flow doesn't work

514 views
Skip to first unread message

evolutions...@gmail.com

unread,
Jan 18, 2017, 1:37:03 PM1/18/17
to Automate
Hi folks !!!

I've tried to use the "Music playlist example" flow to make "Pulsar Music Player" play a playlist. But it's not working, just as it's not with the default Android music player. Are there any requirements a player has to meet in order to be "compatible" with this example flow?

No matter which of the 16 selectable activities of "Pulsar Music Player" I pick in the "App start" block, the given playlist isn't played.

Any ideas?

Greets,
EAR

Henrik "The Developer" Lindqvist

unread,
Jan 18, 2017, 3:14:00 PM1/18/17
to Automate, evolutions...@gmail.com
Try contacting the flow author, leave a review/comment in the community. The author may not be reading this forum.

evolutions...@gmail.com

unread,
Jan 19, 2017, 7:54:42 AM1/19/17
to Automate, evolutions...@gmail.com
OK, I could contact "Automate Developer". Although I've supposed it to accidentally be you by ;-). But I think that's not necessary, because it's a very simple flow with an "App start" block with "Media play from search" as Action and the following line in Extras, where "name" is the output variable from an input dialog.

= {"android.intent.extra.focus": "vnd.android.cursor.item/playlist", "query": name}

So I suppose it's all about picking the right package/activity and the content of this line in Extras. Unfortunately I don't no much about Android intents and the like, but it should be no problem for you, shouldn't it?

Greets,
EAR

Henrik "The Developer" Lindqvist

unread,
Jan 19, 2017, 2:16:31 PM1/19/17
to Automate, evolutions...@gmail.com
Yes, i'm the Automate developer. Sadly i don't have time to Debug user flows.
Try Googling for the proper intent to launching a media player with an specific play list.
https://developer.android.com/guide/components/intents-common.html#Music

evolutions...@gmail.com

unread,
Jan 20, 2017, 8:51:52 AM1/20/17
to Automate, evolutions...@gmail.com
Thanks for the link. But how do I get this whole Java stuff translated into the syntax that is to be used in "Extras" of the "App start" block? So for instance I've tried to "convert" the example intent for playing the music of a particular artist from your link.

public void playSearchArtist(String artist) {
    Intent intent = new Intent(MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH);
    intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS,
                    MediaStore.Audio.Artists.ENTRY_CONTENT_TYPE);
    intent.putExtra(MediaStore.EXTRA_MEDIA_ARTIST, artist);
    intent.putExtra(SearchManager.QUERY, artist);
    if (intent.resolveActivity(getPackageManager()) != null) {
        startActivity(intent);
    }
}


But all I get is "Expected THIS but found THAT" kind of errors in Automate. So it seems that I don't use the right syntax conversion, do I? What's the equivalent to Java braces, parentheses, commas, semicolons to be put in Automate's "Extras" (colon, quotation mark ...)? Or in other words: How can I send the example intent above with Automate to "Pulsar Music Player"?

I'm really at my wit's end. If you haven't got the time to help me, that's OK. But who else could I ask. There's no real Automate discussion forum to my knowledge other than this one here.

Greets,
EAR

Henrik "The Developer" Lindqvist

unread,
Jan 24, 2017, 2:57:28 PM1/24/17
to Automate, evolutions...@gmail.com
Use the App start block...
Action: Media play from search
Extras= { "android.intent.extra.focus": "vnd.android.cursor.item/artist", "android.intent.extra.artist": artist, "query": artist }

evolutions...@gmail.com

unread,
Jan 25, 2017, 6:57:29 AM1/25/17
to Automate, evolutions...@gmail.com
Thanks a lot for your support, Henrik! That's exactly what I was looking for: The Right Syntax ;-). I've tested it with artist, genre, album and playlist. IT WORKS LIKE A CHARM :-) !!!

Keep up the good work ....

Greets,
EAR

nthu...@gmail.com

unread,
Feb 6, 2020, 10:41:17 PM2/6/20
to Automate
For anyone finding this thread in future as I did, you can start the playlist in shuffle mode by editing the given snippet to have "android.intent.extra.focus": "vnd.android.cursor.item/*" instead of "vnd.android.cursor.item/playlist". This was tested with Pulsar music player just like OP.

Found through this comment: https://www.reddit.com/r/gonemadmusicplayer/comments/6yyl6s/starting_shuffle_or_playlist_with_google_voice/dmrvpqb/

Reply all
Reply to author
Forward
Message has been deleted
0 new messages