Control audio player

General discussions about Automagic and automation in general

Moderator: Martin

Gégé
Posts: 8
Joined: 14 Jan 2013 19:52

Control audio player

Post by Gégé » 14 Jan 2013 20:10

Hello,
Is it possible to control the playback of media player JetAudio by a control system Android?
I still have not found a solution.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Control audio player

Post by Martin » 15 Jan 2013 15:10

There seems to be no official API to control jetaudio but you can try to use an action Send Broadcast and fill in one of the following actions:
  • com.jetappfactory.jetaudio.musicservicecommand.next
  • com.jetappfactory.jetaudio.musicservicecommand.previous
  • com.jetappfactory.jetaudio.musicservicecommand.togglepause
  • com.jetappfactory.jetaudio.musicservicecommand.pause
  • com.jetappfactory.jetaudio.musicservicecommand.repeat
  • com.jetappfactory.jetaudio.musicservicecommand.shuffle
You probably have to use togglepause to start/stop playing.

The music app has to be running in the background to send the commands otherwise nothing happens.

Gégé
Posts: 8
Joined: 14 Jan 2013 19:52

Re: Control audio player

Post by Gégé » 15 Jan 2013 21:26

Hello,

I tried everything, even putting "com.jetappfactory.jetaudiopro ..." because I have the purchased version but it does not work.
I asked the order to developer by email, if I have an answer that works I'll keep you informed!

vhick
Posts: 2
Joined: 31 Jan 2013 18:22

Re: Control audio player

Post by vhick » 31 Jan 2013 19:24

Sorry to hi-jack topic but it also about audio control. I cannot launch default player for CM9 (Apollo player). My flow is so simple. Trigger: Wired Headset Plugged with call the action "Control Audio Player: Play". I try to execute to be test, but noting happened.

Please help. Thanks.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Control audio player

Post by Martin » 01 Feb 2013 06:48

Apollo is not supported by Control Audio Player but you can try to do the following:
  • Ensure the audio player is running/active in the background (use action Launch App to start Apollo)
  • add an action Send Broadcast with one of the following actions:
    • com.andrew.apollo.musicservicecommand.next
    • com.andrew.apollo.musicservicecommand.previous
    • com.andrew.apollo.musicservicecommand.togglepause
    • com.andrew.apollo.musicservicecommand.pause
    • com.andrew.apollo.musicservicecommand.cyclerepeat
    • com.andrew.apollo.musicservicecommand.toggleshuffle
Apollo seems not to support the play command directly so you probably have to use togglepause.

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: Control audio player

Post by syndromtr » 05 Feb 2013 09:22

none of them worked for playerpro, so i found another way:
if you have still problems with the mentioned players, try this:
(my flow triggers with wired headset plugged? checks if screen is on, displays input dialog, asks for 2 app for music playback, if playerpro is selected=)

launch app:
package name: com.tbig.playerpro
class name: com.tbig.playerpro.MediaPlaybackActivity
(4 buttons on screen, now playing, but no playback, paused)

this is the solution: just after that:
execute command:
am broadcast -a com.tbig.playerpro.musicservicecommand.togglepause


with this above, music starts to play. send broadcast method didn't work for me but this works!

banhegyinorbert
Posts: 1
Joined: 16 May 2015 13:55

Re: Control audio player

Post by banhegyinorbert » 18 May 2015 07:30

Hello syndromtr,

Maybe I'm a n00b, but I can not use the command you suggested in Tasker. Could you give me a guide?!
(I'm not rooted. Should I be?)

thanks,
Norbert

User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

What about Deezer ?

Post by Rhonin » 25 Nov 2015 06:35

Hi there,

i desperately tried different approaches to get deezer playing after starting it. Whether simply use the method play as media button nor sending broadcast via the same activity from within the same "activity box".

So i ask myself if it is possible to succeed by using a similar command to the quote below:
execute command:
am broadcast -a com.tbig.playerpro.musicservicecommand.togglepause
How could such a command look like for deezer ??? :oops:

THX in advance

Rhonin
Automagic on rooted Xperia Z3c running on Android 5.1.1

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: What about Deezer ?

Post by MURTUMA » 25 Nov 2015 06:52

am broadcast -a com.tbig.playerpro.musicservicecommand.togglepause

Change the bolded package name to match your player.

User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

Re: Control audio player

Post by Rhonin » 25 Nov 2015 08:22

Hi Murtuma,

THX for your quick answer, but tests with different variations didn't lead me to my goal :| I think, that there is a special part within the app that must be adressed via broadcast. s.th. like

deezer.android.app/player or sth. like this

Anyone of the knowing people can give me a hint ?

THX in advance

Rhonin
Automagic on rooted Xperia Z3c running on Android 5.1.1

Post Reply