Most visited

Recently visited

Added in API level 23

MidiDeviceInfo.PortInfo

public static final class MidiDeviceInfo.PortInfo
extends Object

java.lang.Object
   ↳ android.media.midi.MidiDeviceInfo.PortInfo


包含有关输入或输出端口的信息。

Summary

Constants

int TYPE_INPUT

输入端口的端口类型

int TYPE_OUTPUT

输出端口的端口类型

Public methods

String getName()

返回端口的名称,如果端口没有名称,则返回空字符串

int getPortNumber()

返回端口的端口号

int getType()

返回端口的端口类型( TYPE_INPUTTYPE_OUTPUT

Inherited methods

From class java.lang.Object

Constants

TYPE_INPUT

Added in API level 23
int TYPE_INPUT

输入端口的端口类型

常数值:1(0x00000001)

TYPE_OUTPUT

Added in API level 23
int TYPE_OUTPUT

输出端口的端口类型

常量值:2(0x00000002)

Public methods

getName

Added in API level 23
String getName ()

返回端口的名称,如果端口没有名称,则返回空字符串

Returns
String the port name

getPortNumber

Added in API level 23
int getPortNumber ()

返回端口的端口号

Returns
int the port number

getType

Added in API level 23
int getType ()

返回端口的端口类型( TYPE_INPUTTYPE_OUTPUT

Returns
int the port type

Hooray!