Jump to content

Help How to play a music file stored in a variable using intent to play in Poweramp using tasker


vikirecon

Recommended Posts

Hi andrewilley

Thanks for taking note of my query

 

Could you please help me setting up this 

Poweramp Play1 (371)
    A1: Send Intent [ Action:com.maxmpz.audioplayer.API_COMMAND Cat:None Mime Type: Data:content://com.maxmpz.audioplayer.data/storage/emulated/0/A.Music/Devo Modern + Melodious/Vishnu Remix By Azitiz 3.flac Extra:cmd:1 Extra: Extra: Package: Class: Target:Service ] 

I don't know what to use in Data field so that it can play my file 

 

Thanks again 

Regards 

Viki 
 

Link to comment
Share on other sites

@vikirecon , I do not have an answer for you but I can see that the Data content is incorrect. To work with all tracks, you have to use the following url's

- All tracks:
content://com.maxmpz.audioplayer.data/files
content://com.maxmpz.audioplayer.data/files/#

I searched the forum and perhaps @Mr_SeLeNiO can help?

 

Link to comment
Share on other sites

@vikirecon sent you a message

 

EDIT: I'll also add my solution here for everyone else. 
This is mainly a task request, so I just made a sample profile to show that it works by trigger (and also so I can export it and make it downloadable for everyone else from the new taskernet feature), in this case, the trigger is opening the settings app, so when you open settings it will start playing the song, in the case of @vikirecon it is vishnu remix, so change that to whatever you want, oh, and as you can see in the task, it's set in a variable, of course you can set that variable inside any other task, I just made it be set in the same task that sends the intent for obvious sharing reasons. Also obviously you can delete the profile and create a new one to suit your needs and just use the task. 

Description: I couldn't find a way to open a file path, so I just query a search (use the NAME of the song NOT THE FILE NAME) and limited to 1 result: 

content://com.maxmpz.audioplayer.data/search?lim=1&flt=the SONG NAME you want

 

Solution:

https://taskernet.com/shares/?user=AS35m8l%2FTG5rH0nc3dkUf0velJg1WfGzFJGHG97Zz0lrjOjHn6zHg8Var6FcUlUHhN%2Byy8k%3D&id=Profile%3APowerampTriggerSong#

 

EDIT 2: I don't know why but it's not limiting to 1 result, may be a bug @maxmp

Link to comment
Share on other sites

Thanks @Mr_SeLeNiO 

I am facing two issues now first is it didn't play the intended song 

Secondly with the above approach of searching,filtering music from the database the problem is that it will not stop playing after the intended song is played, it will go on to play all the songs in the folder which is not desired 

What I want want is (Action Box plugin for tasker ) style play where we just use the file path of the track and it will play the song and then stop. In action box the problem is that we cannot use variable 

Is there any other way of achieving this task? 

Thanks again 

Regards 

Viki 

Link to comment
Share on other sites

1 hour ago, vikirecon said:

Thanks @Mr_SeLeNiO 

I am facing two issues now first is it didn't play the intended song 

Secondly with the above approach of searching,filtering music from the database the problem is that it will not stop playing after the intended song is played, it will go on to play all the songs in the folder which is not desired 

What I want want is (Action Box plugin for tasker ) style play where we just use the file path of the track and it will play the song and then stop. In action box the problem is that we cannot use variable 

Is there any other way of achieving this task? 

Thanks again 

Regards 

Viki 

well, with that system you could just add a "wait" for the length of the song, and then send command 14 or 2, even command 1 will work for this matter, either after the wait or as an exit task, and sorry but I couldn't manage to make it work with file://path, I get error 877, you can look at the Poweramp api yourself and experiment, I'm no expert on this really, jsut trying to help because I also learn from this. you could also add more words to flt=

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...