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
Art'
API for dev?
Moderator: Gurus
-
- Posts: 241
- Joined: Thu Nov 14, 2013 5:23 pm
Re: API for dev?
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);
sendBroadcast(intent);
Are you satisfied with this?
If you will need to add some other intents, let me know.
Best regards
Martin
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);
sendBroadcast(intent);
Are you satisfied with this?
If you will need to add some other intents, let me know.
Best regards
Martin
Re: API for dev?
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 )!
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?
Hi,
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.
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.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts