MidiManager.RegisterDeviceCallback Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| RegisterDeviceCallback(MidiManager+DeviceCallback, Handler) |
Registers a callback to receive notifications when MIDI devices are added and removed. |
| RegisterDeviceCallback(Int32, IExecutor, MidiManager+DeviceCallback) |
Registers a callback to receive notifications when MIDI devices are added and removed for a specific transport type. |
RegisterDeviceCallback(MidiManager+DeviceCallback, Handler)
Registers a callback to receive notifications when MIDI devices are added and removed.
[Android.Runtime.Register("registerDeviceCallback", "(Landroid/media/midi/MidiManager$DeviceCallback;Landroid/os/Handler;)V", "", ApiSince=23)]
public void RegisterDeviceCallback(Android.Media.Midi.MidiManager.DeviceCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("registerDeviceCallback", "(Landroid/media/midi/MidiManager$DeviceCallback;Landroid/os/Handler;)V", "", ApiSince=23)>]
member this.RegisterDeviceCallback : Android.Media.Midi.MidiManager.DeviceCallback * Android.OS.Handler -> unit
Parameters
- callback
- MidiManager.DeviceCallback
a DeviceCallback for MIDI device notifications
- handler
- Handler
The android.os.Handler Handler that will be used for delivering the
device notifications. If handler is null, then the thread used for the
callback is unspecified.
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
RegisterDeviceCallback(Int32, IExecutor, MidiManager+DeviceCallback)
Registers a callback to receive notifications when MIDI devices are added and removed for a specific transport type.
[Android.Runtime.Register("registerDeviceCallback", "(ILjava/util/concurrent/Executor;Landroid/media/midi/MidiManager$DeviceCallback;)V", "", ApiSince=33)]
public void RegisterDeviceCallback(int transport, Java.Util.Concurrent.IExecutor executor, Android.Media.Midi.MidiManager.DeviceCallback callback);
[<Android.Runtime.Register("registerDeviceCallback", "(ILjava/util/concurrent/Executor;Landroid/media/midi/MidiManager$DeviceCallback;)V", "", ApiSince=33)>]
member this.RegisterDeviceCallback : int * Java.Util.Concurrent.IExecutor * Android.Media.Midi.MidiManager.DeviceCallback -> unit
Parameters
- transport
- Int32
The transport to be used. This is either TRANSPORT_MIDI_BYTE_STREAM or TRANSPORT_UNIVERSAL_MIDI_PACKETS. Value is one of the following: TRANSPORT_MIDI_BYTE_STREAM; TRANSPORT_UNIVERSAL_MIDI_PACKETS
- executor
- IExecutor
The Executor that will be used for delivering the device notifications. This value cannot be null.
- callback
- MidiManager.DeviceCallback
a DeviceCallback for MIDI device notifications. This value cannot be null.
- Attributes
Remarks
Registers a callback to receive notifications when MIDI devices are added and removed for a specific transport type. The DeviceCallback.onDeviceStatusChanged method will be called immediately for any devices that have open ports. This allows applications to know which input ports are already in use and, therefore, unavailable. Applications should call getDevicesForTransport(int) before registering the callback to get a list of devices already added.
Android reference for android.media.midi.MidiManager.registerDeviceCallback.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.