Android APIs
public final class

MidiDeviceStatus

extends Object
implements Parcelable
java.lang.Object
   ↳ android.media.midi.MidiDeviceStatus

Class Overview

This is an immutable class that describes the current status of a MIDI device's ports.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<MidiDeviceStatus> CREATOR
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
MidiDeviceInfo getDeviceInfo()
Returns the MidiDeviceInfo of the device.
int getOutputPortOpenCount(int portNumber)
Returns the number of clients currently connected to the specified output port.
boolean isInputPortOpen(int portNumber)
Returns true if an input port is open.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<MidiDeviceStatus> CREATOR

Added in API level 23

Public Methods

public int describeContents ()

Added in API level 23

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public MidiDeviceInfo getDeviceInfo ()

Added in API level 23

Returns the MidiDeviceInfo of the device.

Returns
  • the device info

public int getOutputPortOpenCount (int portNumber)

Added in API level 23

Returns the number of clients currently connected to the specified output port. Unlike input ports, an output port can be opened by multiple clients at the same time.

Parameters
portNumber the output port's port number
Returns
  • output port open count

public boolean isInputPortOpen (int portNumber)

Added in API level 23

Returns true if an input port is open. An input port can only be opened by one client at a time.

Parameters
portNumber the input port's port number
Returns
  • input port open status

public String toString ()

Added in API level 23

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.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel parcel, int flags)

Added in API level 23

Flatten this object in to a Parcel.

Parameters
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.