papete Posted February 14, 2020 Share Posted February 14, 2020 I think I posted in the wrong place so I'm starting a new thread. I used to use the search API command with Tasker using this action: Send Intent [ Action:com.maxmpz.audioplayer.API_COMMAND Cat:None Mime Type: Data:content://com.maxmpz.audioplayer.data/files?flt=search string Extra: cmd:20 Extra: Package: Class: Target:Service ] It used to work like a charm, but since I don't know when this command does not work anymore. I checked the API documentation and it seems that the command changed. Accordingly, I updated my Tasker action to the following: Send Intent [ Action:com.maxmpz.audioplayer.API_COMMAND Cat:None Mime Type: Data:content://com.maxmpz.audioplayer.data/search?flt=search string Extra: cmd:20 Extra: Package: Class: Target:Service ] But the above command does nothing. Looking at the forums, I found that I can use an Android intent for the same purpose: Send Intent [ Action:android.media.action.MEDIA_PLAY_FROM_SEARCH Cat:None Mime Type: Data: Extra: query: YOUR SEARCH STRING HERE Extra: android.intent.extra.user_query: shuffle Package: com.maxmpz.audioplayer Class: com.maxmpz.audioplayer.ListActivity Target:Activity ] And the above intent works, however it is way slower and does bring Poweramp to the front, which is a behavior that I don't want for the situation I'll be using it (while driving). Is the native Poweramp API search command not working or am I doing something wrong? Thanks Quote Link to comment Share on other sites More sharing options...
maxmp Posted February 15, 2020 Share Posted February 15, 2020 content://com.maxmpz.audioplayer.data/files?flt=search string this won't work anymore as there is no filtering anymore The correct approach is to use standard intents like android.media.action.MEDIA_PLAY_FROM_SEARCH, but it's sent to activity, so activity popups. Alternatively, you can send intent as previously to the service. The intent is standard android.provider.MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH (=="android.media.action.MEDIA_PLAY_FROM_SEARCH"), so it's like your last intent code, but you send it to the service instead of the activity. See doc comments here for the details: https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_lib/src/com/maxmpz/poweramp/player/PowerampAPI.java#L36 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.