Stay organized with collections
Save and categorize content based on your preferences.
PortInfo
class PortInfo
Contains information about an input or output port.
Summary
Constants |
static Int |
Port type for input ports
|
static Int |
Port type for output ports
|
Public methods |
String! |
Returns the name of the port, or empty string if the port has no name
|
Int |
Returns the port number of the port
|
Int |
Returns the port type of the port (either TYPE_INPUT or TYPE_OUTPUT )
|
Constants
static val TYPE_INPUT: Int
Port type for input ports
Value: 1
TYPE_OUTPUT
static val TYPE_OUTPUT: Int
Port type for output ports
Value: 2
Public methods
getName
fun getName(): String!
Returns the name of the port, or empty string if the port has no name
getPortNumber
fun getPortNumber(): Int
Returns the port number of the port
Return |
Int |
the port number |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MidiDeviceInfo.PortInfo\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPortInfo\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/midi/MidiDeviceInfo.PortInfo \"View this page in Java\") \n\n```\nclass PortInfo\n```\n\n|---|-------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.midi.MidiDeviceInfo.PortInfo](#) |\n\nContains information about an input or output port.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_INPUT](#TYPE_INPUT:kotlin.Int) Port type for input ports |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_OUTPUT](#TYPE_OUTPUT:kotlin.Int) Port type for output ports |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getName](#getName())`()` Returns the name of the port, or empty string if the port has no name |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPortNumber](#getPortNumber())`()` Returns the port number of the port |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getType](#getType())`()` Returns the port type of the port (either [TYPE_INPUT](#TYPE_INPUT:kotlin.Int) or [TYPE_OUTPUT](#TYPE_OUTPUT:kotlin.Int)) |\n\nConstants\n---------\n\n### TYPE_INPUT\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_INPUT: Int\n```\n\nPort type for input ports \n\n Value: 1\n\n### TYPE_OUTPUT\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_OUTPUT: Int\n```\n\nPort type for output ports \n\n Value: 2\n\nPublic methods\n--------------\n\n### getName\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getName(): String!\n```\n\nReturns the name of the port, or empty string if the port has no name\n\n| Return ||\n|-----------------------------------------------------------------------------------|---------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the port name |\n\n### getPortNumber\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getPortNumber(): Int\n```\n\nReturns the port number of the port\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the port number |\n\n### getType\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getType(): Int\n```\n\nReturns the port type of the port (either [TYPE_INPUT](#TYPE_INPUT:kotlin.Int) or [TYPE_OUTPUT](#TYPE_OUTPUT:kotlin.Int))\n\n| Return ||\n|----------------------------------------------------------------------------|---------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the port type |"]]