Jump to content

MEDIA_PLAY_FROM_SEARCH only supports simple freeform query!?


Recommended Posts

Hi there,

I already read several topics like this one and of course the Poweramp API documentation for MEDIA_PLAY_FROM_SEARCH here.


What already works

I can send an intent from tasker using the simple freeform query like this one:

Action: android.media.action.MEDIA_PLAY_FROM_SEARCH
Category: Default
Extra: query:Midnight Oil
Package: com.maxmpz.audioplayer

As there is only one Artist with the name "Midnight Oil" Poweramp will correctly play all titles of the artist "Midnight Oil" with this intent.

If instead of "Midnight Oil" I will put "Debut", Poweramp will play the album "Debut" from "Björk", even if I have other titles, folders and so on, which also have "Debut" in the name.


What works in a strange manner

With the same intent as show above, if I put "Björk Debut" instead of "Midnight Oil", then one would expect, that Poweramp also plays the album "Debut" from "Björk". But instead it will play the alphabeticaly first entry of the Album "Debut", which is "Aeroplane" and after that will play the alphabeticaly next track in my whole collection (see image below).


So, why is this a problem: In the case of the mentioned album "Debut" I could solve this by using "Debut" instead of "Björk Debut" as query string. But in several other cases I have no way to get exactly the album I want. Here is another example: query:23 -> 23 is the name of an album from "Blonde Redhead" and also the name of a track of the same album. Therefore it will play the track 23.


What doesn't work

So, of course I tried to use the more specific type of query, the "focused query" mentioned here in the API description. But I don't get it to work. It always does nothing or only considers the query-part and ignores the focus-part. So either I am using it the wrong way or Poweramp only supports the freeform query. Here are some of my not working attempts:

Action: android.media.action.MEDIA_PLAY_FROM_SEARCH
Category: Default
Extra: query:Björk Debut
Extra: focus:vnd.android.cursor.item/album
Package: com.maxmpz.audioplayer
Action: android.media.action.MEDIA_PLAY_FROM_SEARCH
Category: Default
Extra: focus:vnd.android.cursor.item/album
Extra: album:Debut
Extra: artist:Björk
Package: com.maxmpz.audioplayer

Does anyone has a working example for using the focused query, in Tasker or plain Java?



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...