From 11fd96d6ff25bc1d710448eab545fe09da55a5f5 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 2 Mar 2015 12:07:49 -0800 Subject: MidiManager: Virtual MIDI devices are now implemented as Services To implement a virtual MIDI device, include a subclass of MidiDeviceService in your application. This service is identified by an intent filter and meta-data in the application's manifest to allow the MIDI manager to register the virtual device without actually running the application. Instead, the application's MidiDeviceService subclass is started on demand when MIDI manager clients want to open the device. Here is an example of how the MidiDeviceService might be described in the application manifest: and the device_info.xml meta-data: (note that the and names are not currently used, but support for these will be added in a subsequent change) Client's of the virtual device will bind directly to the hosting application's MidiDeviceService subclass. To support this, MidiManager.openDevice() now returns the MidiDevice asynchronously via a callback. This change also adds a utility class called MidiDispatcher, which is a MidiReceiver that dispatches all data it receives to a list of other MidiReceivers. We now use this internally in MidiInputPort and MidiDeviceServer, but developers may use it for other purposes as well. Change-Id: Ic3009f06d56f3d5edbd87de3f0c330b51a1c217d --- Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 669efc7..19d3de9 100644 --- a/Android.mk +++ b/Android.mk @@ -333,8 +333,8 @@ LOCAL_SRC_FILES += \ media/java/android/media/IRingtonePlayer.aidl \ media/java/android/media/IVolumeController.aidl \ media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl \ + media/java/android/media/midi/IMidiDeviceListener.aidl \ media/java/android/media/midi/IMidiDeviceServer.aidl \ - media/java/android/media/midi/IMidiListener.aidl \ media/java/android/media/midi/IMidiManager.aidl \ media/java/android/media/projection/IMediaProjection.aidl \ media/java/android/media/projection/IMediaProjectionCallback.aidl \ -- cgit v1.1