Stay organized with collections
Save and categorize content based on your preferences.
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMidiManager.OnDeviceOpenedListener\n==================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/midi/MidiManager.OnDeviceOpenedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMidiManager.OnDeviceOpenedListener\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------------|\n| android.media.midi.MidiManager.OnDeviceOpenedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nListener class used for receiving the results of [MidiManager.openDevice(MidiDeviceInfo, OnDeviceOpenedListener, Handler)](/reference/android/media/midi/MidiManager#openDevice(android.media.midi.MidiDeviceInfo,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler)) and\n[MidiManager.openBluetoothDevice(BluetoothDevice, OnDeviceOpenedListener, Handler)](/reference/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 void` | ` `[onDeviceOpened](/reference/android/media/midi/MidiManager.OnDeviceOpenedListener#onDeviceOpened(android.media.midi.MidiDevice))`(`[MidiDevice](/reference/android/media/midi/MidiDevice)` device) ` Called to respond to a [MidiManager.openDevice(MidiDeviceInfo, OnDeviceOpenedListener, Handler)](/reference/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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDeviceOpened (MidiDevice device)\n```\n\nCalled to respond to a [MidiManager.openDevice(MidiDeviceInfo, OnDeviceOpenedListener, Handler)](/reference/android/media/midi/MidiManager#openDevice(android.media.midi.MidiDeviceInfo,%20android.media.midi.MidiManager.OnDeviceOpenedListener,%20android.os.Handler)) request\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------|\n| `device` | `MidiDevice`: a [MidiDevice](/reference/android/media/midi/MidiDevice) for opened device, or null if opening failed \u003cbr /\u003e |"]]