Page 1 of 1

DSuB for default handler of media activities

PostPosted: Fri Feb 01, 2013 12:02 pm
by odt
Hey,

Would it be possible to have an option to configure DSuB as the default media app on android so all "play media" etc requests are handled by it? These are common activities used by many droid automation/macro apps but they are useless to me unless they work with DSuB :)

EDIT: I should add I have "Media Buttons" option activated, but it seems that these will only do anything when DSuB has been launched and some playback already started.

Re: DSuB for default handler of media activities

PostPosted: Fri Feb 01, 2013 4:49 pm
by daneren2005
No that would require a complete rewrite of how the app plays songs. Everything in the code revolves around the fact that these songs exist somewhere on the original server. It can't play songs that are anywhere but under the folder it is saving stuff to. It's a streaming client, not a general purpose media client. There are plenty of those already ;)

Re: DSuB for default handler of media activities

PostPosted: Fri Feb 01, 2013 6:27 pm
by odt
Sorry, I didnt mean to handle "any media" with DSuB, but rather than the "play media" activities would be routed to DSuB and use the active playlist from there. I dont use any "general purpose" media players as I only have the media on my sdcard thats already been cached by DSuB :)

Re: DSuB for default handler of media activities

PostPosted: Fri Feb 01, 2013 6:56 pm
by daneren2005
Alright then I don't understand what you mean by "play media" activities. Can you give me a cause and effect example?

Re: DSuB for default handler of media activities

PostPosted: Sat Feb 02, 2013 1:10 pm
by odt
There are some generic media actions in couple of automation/macro utilities for android that read "play media, pause media, mute media" and similiar but they dont have any program associated with them so Im thinking it must be some android API call that gets routed to whatever application is the default handler for those.

Actually thinking bout it, a much easier approach would be to have an option to autoplay the current playlist when DSuB is started/restarted. Would that be doable?

Re: DSuB for default handler of media activities

PostPosted: Sat Feb 02, 2013 6:28 pm
by daneren2005
Could you give me an example of app or way to trigger that so I can figure out how it's started? And it's planned to have an option to start playback automatically if headphones/bluetooth are started, but I wasn't going to add one for when it starts up. I guess that wouldn't be that hard to do as well.

Re: DSuB for default handler of media activities

PostPosted: Sun Feb 03, 2013 8:46 am
by odt
For example the builtin Xperia SmartConnect app on my phone has such options. Theres a "music at home" activity which triggers when headphones are connected. I have set it to set volume, launch DSuB and "play media". It starts up DSuB but still starts to play random music with the walkman app, not DSuB though, which is kinda unfortunate.

Re: DSuB for default handler of media activities

PostPosted: Sun Feb 03, 2013 5:07 pm
by daneren2005
I tried Googling a bit for it but I really have no clue what signals it is sending to play. I mean I'm pretty sure I already listen to all of the standard signals so I'm thinking its that the Walkman app probably is setup to start automatically when headphones are connected, which like I said I am working on.

Sent from my HTC One X using Tapatalk 2