Stay organized with collections
Save and categorize content based on your preferences.
OnDeviceOpenedListener
interface OnDeviceOpenedListener
Listener class used for receiving the results of openDevice
and openBluetoothDevice
Summary
Public methods |
abstract Unit |
Called to respond to a openDevice request
|
Public methods
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,["# MidiManager.OnDeviceOpenedListener\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnDeviceOpenedListener\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/midi/MidiManager.OnDeviceOpenedListener \"View this page in Java\") \n\n```\ninterface OnDeviceOpenedListener\n```\n\n|------------------------------------------------------------|\n| [android.media.midi.MidiManager.OnDeviceOpenedListener](#) |\n\nListener class used for receiving the results of [openDevice](/reference/kotlin/android/media/midi/MidiManager#openDevice(android.media.midi.MidiDeviceInfo,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler)) and [openBluetoothDevice](/reference/kotlin/android/media/midi/MidiManager#openBluetoothDevice(android.bluetooth.BluetoothDevice,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler))\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDeviceOpened](#onDeviceOpened(android.media.midi.MidiDevice))`(`device:` `[MidiDevice](/reference/kotlin/android/media/midi/MidiDevice)!`)` Called to respond to a [openDevice](/reference/kotlin/android/media/midi/MidiManager#openDevice(android.media.midi.MidiDeviceInfo,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler)) request |\n\nPublic methods\n--------------\n\n### onDeviceOpened\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDeviceOpened(device: MidiDevice!): Unit\n```\n\nCalled to respond to a [openDevice](/reference/kotlin/android/media/midi/MidiManager#openDevice(android.media.midi.MidiDeviceInfo,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler)) request\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `device` | [MidiDevice](/reference/kotlin/android/media/midi/MidiDevice)!: a [MidiDevice](/reference/kotlin/android/media/midi/MidiDevice) for opened device, or null if opening failed |"]]