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);
sendBroadcast(intent);
Are you satisfied with this?
If you will need to add some other intents, let me know.
Best regards
Martin
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/android/media/session/MediaController.TransportControls.html
example of such app you can find here:
https://github.com/googlesamples/android-media-controller
for browsing MMA content you can use
https://developer.android.com/reference/android/support/v4/media/MediaBrowserCompat.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/topics/media-apps/audio-app/building-a-mediabrowser-client.html#connect-to-mediabrowserservice
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