-
-
Save KazuyukiEguchi/67c9562d427dc069d357cebc2c4011ea to your computer and use it in GitHub Desktop.
Android MIDI APIでBLE MIDI機器を繋いだときに嵌まったこと ref: http://qiita.com/KazuyukiEguchi/items/536b6b3bd3fe24b7f0c0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MidiDevice mMidiDevice = null; | |
mMIDIManager.openBluetoothDevice(device, new MidiManager.OnDeviceOpenedListener() { | |
@Override | |
public void onDeviceOpened(MidiDevice midiDevice) { | |
if(midiDevice != null) | |
{ | |
mMidiDevice = midiDevice; | |
〜 省略 〜 | |
} | |
} | |
,mHandler); | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
if(mMidiDevice != null) { | |
try { | |
mMidiDevice.close(); | |
mMidiDevice = null; | |
} catch(IOException e) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment