Back to project page BLE-MIDI-for-Android.
The source code is released under:
Apache License
If you think the Android project BLE-MIDI-for-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package jp.kshoji.blemidi.peripheral; /*from w w w .ja v a2 s. c om*/ import android.bluetooth.BluetoothDevice; import android.text.TextUtils; /** * MidiInputDevice for Peripheral * @author K.Shoji */ public final class MidiInputDevice extends jp.kshoji.blemidi.device.MidiInputDevice { private final BluetoothDevice bluetoothDevice; /** * Constructor for Peripheral * @param bluetoothDevice the device * */ public MidiInputDevice(BluetoothDevice bluetoothDevice) { super(); this.bluetoothDevice = bluetoothDevice; } @Override public String getDeviceName() { if (TextUtils.isEmpty(bluetoothDevice.getName())) { return bluetoothDevice.getAddress(); } return bluetoothDevice.getName(); } @Override protected void incomingData(byte[] data) { super.incomingData(data); } }