Jump to content



Recommended Posts

I'm trying to facilitate some functions using SWC & external device for copilot.


  • Poweramp build number (available in Poweramp Settings / About)

Builds 948-957

  • your device model

Car radio, Emulator, Phone

  • your Android version

10, 7.1, 13

  • your custom ROM name/version (if you're on custom ROM)

Stock android

  • steps to reproduce

see video

- When querying album, spaces break the query

01:23, 02:13
- When querying artist or album with MEDIA_SEARCH the last category view is shown

Use cases
I would like to have a combination of MEDIA_SEARCH and MEDIA_PLAY_FROM_SEARCH

#1 if a song is playing, I might want to search 
    a) the corresponding album while the current song keeps playing -> MEDIA_SEARCH, ALBUM VIEW
    b) the artist's songs while the current song keeps playing -> MEDIA_SEARCH, ALL ARTIST SONGS VIEW
#2 if nothing is playing, search for album/artist (with spaces) and start the first song -> MEDIA_PLAY_FROM_SEARCH with it's view

Am I doing something wrong? Does it work like designed? Is the above possible?



Link to comment
Share on other sites

Hi max

Thanks for taking a look - and for your great app! 😁

I'm not quite sure if I understand you correctly.
Google Assistant is not used at all.

I'm using Llamalab Automate and these are the queries:

1)     Check if media is playing
    Media player package: com.maxmpz.audioplayer
    If yes, Save Album and Artist name as variables

    If yes, 
    1a) Broadcast receive: com.maxmpz.audioplayer.TRACK_CHANGED
        Although I just used it for checking stuff. 

    If not,
    1b) variables will be set in input dialog

2)    Set SearchMediaAction Variable to either
3)     Since spaces are apparently not supported in album name:
    Variable MyAlbum is splitted by " " and only the first word is saved in MyAlbum
4)    Broadcast send
    package: com.maxmpz.audioplayer
    Receiver class: com.maxmpz.audioplayer.player.PowerampAPIReceiver
    Action: SearchMediaAction
    Extras for album: {"android.intent.extra.album": MyAlbum, "android.intent.extra.focus": "vnd.android.cursor.item/album"}
    Extras for artist: {"android.intent.extra.artist": MyArtist, "android.intent.extra.focus": "vnd.android.cursor.item/artist"}
5)    0.5s delay

6)    App start
    package: com.maxmpz.audioplayer
    Activity class: com.maxmpz.audioplayer.player.StartupActivity
    Action: com.maxmpz.audioplayer.ACTION_SHOW_CURRENT

Choice dialog (NO) explanation:
since I use the same SWC button for play/pause, the first dialog (MEDIA_PLAY_FROM_SEARCH or MEDIA_SEARCH) was just for the video.
When choice dialog is not used it will play or pause the song after the timeout.

!Poweramp Extra Service.png

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...