paolo
New Member
Posts: 42
|
Post by paolo on Aug 13, 2022 9:39:06 GMT -5
Hello. I know very little of Android apps, but I noticed that I can play a playlist (M3U8 file) by invoking GoneMAD:gonemad.gmmp:.ui.main.MainActivity with "file:path-and-filename" as a parameter. I set this up in Total Commander. Is there another activity I could specify to ENQUEUE (i.e., add to the end of a playing queue) instead of PLAY (replace the playing queue)? Thanks! p.
|
|
|
Post by GoneMAD on Aug 13, 2022 9:54:23 GMT -5
|
|
paolo
New Member
Posts: 42
|
Post by paolo on Aug 13, 2022 11:00:13 GMT -5
Thanks for the quick answer: sounds perfect.
As mentioned I am pretty much an ignoramus: I seem to understand how to broadcast them programmatically and ultimately this is what I will care for.
But, immediately, I wonder if there is a way to broadcast them through Total Commander, for instance when a playlist is selected. Would you know that? I tried and so far I failed to figure out how.
p.
|
|
|
Post by GoneMAD on Aug 13, 2022 11:22:28 GMT -5
i have never used total commander, so unfortunately cant help you there
|
|
paolo
New Member
Posts: 42
|
Post by paolo on Aug 13, 2022 11:27:44 GMT -5
Ok, thanks.
|
|
paolo
New Member
Posts: 42
|
Post by paolo on Aug 17, 2022 9:06:22 GMT -5
GoneMAD, I wonder if you could have a look to this post on the Total Commander forum: Broadcasting intents when a file is selected. The author of Total Commander has suggested a few solutions but unfortunately they all failed. I have the feeling you would instantly spot what we are doing wrong (command? action?).
|
|
|
Post by GoneMAD on Aug 17, 2022 9:24:01 GMT -5
You shouldnt need to specify the receiver. Backup / restore is handled differently since its defined in the manifest and will work even if GMMP is not running. The other intents require gmmp's music service to be running. I think most users will script things to launch the music service (gonemad.gmmp.playback.service.MusicService is the class) first and then send the command intent gonemadmusicplayer.proboards.com/post/7604/threadam broadcast -a gonemad.gmmp.command.PLAY_FILE -e filename "<path to mp3 file>" -t audio/mp3 Since the broadcast receiver for all the commands are registered dynamically when the music service is running, you shouldnt have to target an activity / receiver when broadcasting the event. For testing purposes, just make sure gmmp is running in the background first before trying the intent. Get that working and then you can worry about ensuring the music service is running (since android likes to kill idle services)
|
|
paolo
New Member
Posts: 42
|
Post by paolo on Aug 17, 2022 9:39:13 GMT -5
I see. I am using some internal function of Total Commander and cannot exactly understand if it is completely equivalent to the "am" command you suggest, but I am trying to send just the action/intent to pause music (gonemad.gmmp.command.PAUSE) without specifying a receiver and while GMMP is playing. It seems to me the simplest example (no extras, etc.), but it returns "No Activity found to handle Intent {act=gonemad.gmmp.command.PAUSE ...".
|
|
|
Post by GoneMAD on Aug 17, 2022 10:14:09 GMT -5
what i pasted was the adb command (this is what i used to test intents) riptutorial.com/android/example/10642/sending-broadcastYou'd have to ask the total commander dev what it does when a receiver isnt specified. Its perfectly valid to broadcast an intent in android that nothing is listening for. My guess is TC is only looking for apps that have registered for intents via their manifest (and not dynamically registering like gmmp does) according to this link you can send a broadcast to a specific package.. which might do the job "gonemad.gmmp" is the package
|
|
paolo
New Member
Posts: 42
|
Post by paolo on Aug 18, 2022 5:24:01 GMT -5
The author of Total Commander has clarified the issue. It might get solved in a future version. Thanks for the support!
|
|
|
Post by GoneMAD on Aug 18, 2022 8:59:05 GMT -5
np. i'll try to remember to update the documentation so i dont have to dig through the forums again next time this is asked haha
|
|