API for dev?

Post a reply

:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review

Expand view Topic review: API for dev?

Re: API for dev?

by Peke » Thu Dec 28, 2017 10:08 pm

Custom key assignment (like shortcuts in Windows) is not possible ATM in MMA, but as Martin said an app can be made to control MMA.

Re: API for dev?

by Artgeek » Thu Dec 28, 2017 3:52 pm

Hello Martin,

I didn't see your answer before, thank you very much!
I'd like to use a small remote control like this https://www.amazon.fr/dp/B06XRDWX76/ref ... w=g&hvqmt= I'll check if I can bind my own controls on top of that to send new intents (on "double tap" for example).

This intent is exactly what I had in mind. I would also need to play music from Genres, could it be possible? Like the actual feature to play (with random order) tracks by adding them to the "Now playing list".

I'll give you more explanations on my motives next time (I just wanted to reply quickly to your message today ;) )!

Re: API for dev?

by martin.bohac » Tue Dec 19, 2017 7:39 pm

Hi Art,
it's great. I will try to be helpful. I hope I understand your intents.
What kind of Bluetooth remote controller do you have?
To control MMA do you want to implement your own app or somehow map BT keys?

If you are interested to control MMA playback from your app, you can use
https://developer.android.com/reference ... trols.html

example of such app you can find here:
https://github.com/googlesamples/androi ... controller

for browsing MMA content you can use
https://developer.android.com/reference ... ompat.html
(as component use new ComponentName("com.ventismedia.android.mediamonkey", "com.ventismedia.android.mediamonkey.player.PlaybackService"))
I have not found fully implemented source code example of MediaBrowser client, but here is some basic info
https://developer.android.com/guide/top ... serservice

For setup "sleep timer" we have to add special intent for that.
For example
Intent intent = new Intent("com.ventismedia.android.mediamonkey.ACTION_SETUP_SLEEPTIMER");
intent.putExtra("PLAY_AUDIO_FOR_TIME_IN_MINUTES", 15);

Are you satisfied with this?
If you will need to add some other intents, let me know.

Best regards

API for dev?

by Artgeek » Wed Dec 13, 2017 3:21 pm

I'm pretty hyped by MMA features but I'd like to use it with a bluetooth remote controler. I read this page http://www.mediamonkey.com/wiki/index.p ... d_dev_docs and it's pretty tight.
Is it possible for me to add custom actions like using the sleep timer or launch a particular playlist remotely?

If so I could replace my actual audio server (on a raspberry with custom buttons) by MMA, making it movable and much more lighter :) !
Finger crossed