java.lang.Object | |
↳ | android.media.midi.MidiDeviceInfo |
This class contains information to describe a MIDI device. For now we only have information that can be retrieved easily for USB devices, but we will probably expand this in the future. This class is just an immutable object to encapsulate the MIDI device description. Use the MidiDevice class to actually communicate with devices.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MidiDeviceInfo.PortInfo | Contains information about an input or output port. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | PROPERTY_BLUETOOTH_DEVICE | Bundle key for the device's corresponding Bluetooth device. | |||||||||
String | PROPERTY_MANUFACTURER | Bundle key for the device's manufacturer name property. | |||||||||
String | PROPERTY_NAME | Bundle key for the device's user visible name property. | |||||||||
String | PROPERTY_PRODUCT | Bundle key for the device's product name property. | |||||||||
String | PROPERTY_SERIAL_NUMBER | Bundle key for the device's serial number property. | |||||||||
String | PROPERTY_USB_DEVICE | Bundle key for the device's corresponding USB device. | |||||||||
String | PROPERTY_VERSION | Bundle key for the device's version property. | |||||||||
int | TYPE_BLUETOOTH |
Constant representing Bluetooth MIDI devices for getType()
|
|||||||||
int | TYPE_USB |
Constant representing USB MIDI devices for getType()
|
|||||||||
int | TYPE_VIRTUAL |
Constant representing virtual (software based) MIDI devices for getType()
|
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Compares this instance with the specified object and indicates if they
are equal.
| |||||||||||
Returns the ID of the device.
| |||||||||||
Returns the device's number of input ports.
| |||||||||||
Returns the device's number of output ports.
| |||||||||||
Returns information about the device's ports.
| |||||||||||
Returns the
Bundle containing the device's properties.
| |||||||||||
Returns the type of the device.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Returns true if the device is private.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Bundle key for the device's corresponding Bluetooth device.
The value for this property is of type BluetoothDevice
.
Only set for Bluetooth MIDI devices.
Used with the Bundle
returned by getProperties()
Bundle key for the device's manufacturer name property.
The value for this property is of type String
.
Used with the Bundle
returned by getProperties()
.
Matches the USB device manufacturer name string for USB MIDI devices.
Bundle key for the device's user visible name property.
The value for this property is of type String
.
Used with the Bundle
returned by getProperties()
.
For USB devices, this is a concatenation of the manufacturer and product names.
Bundle key for the device's product name property.
The value for this property is of type String
.
Used with the Bundle
returned by getProperties()
Matches the USB device product name string for USB MIDI devices.
Bundle key for the device's serial number property.
The value for this property is of type String
.
Used with the Bundle
returned by getProperties()
Matches the USB device serial number for USB MIDI devices.
Bundle key for the device's corresponding USB device.
The value for this property is of type UsbDevice
.
Only set for USB MIDI devices.
Used with the Bundle
returned by getProperties()
Bundle key for the device's version property.
The value for this property is of type String
.
Used with the Bundle
returned by getProperties()
Matches the USB device version number for USB MIDI devices.
Constant representing Bluetooth MIDI devices for getType()
Constant representing USB MIDI devices for getType()
Constant representing virtual (software based) MIDI devices for getType()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Compares this instance with the specified object and indicates if they
are equal. In order to be equal, o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
o | the object to compare this instance with. |
---|
true
if the specified object is equal to this Object
; false
otherwise.Returns the ID of the device. This ID is generated by the MIDI service and is not persistent across device unplugs.
Returns the device's number of input ports.
Returns the device's number of output ports.
Returns information about the device's ports. The ports are in unspecified order.
MidiDeviceInfo.PortInfo
Returns the Bundle
containing the device's properties.
Returns the type of the device.
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
Returns true if the device is private. Private devices are only visible and accessible to clients with the same UID as the application that is hosting the device.
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
Flatten this object in to a Parcel.
parcel | The Parcel in which the object should be written. |
---|---|
flags | Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|