Android Open Source - BLE-MIDI-for-Android Midi Input Device

From Project

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.

Java Source Code

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) {
        this.bluetoothDevice = bluetoothDevice;

    public String getDeviceName() {
        if (TextUtils.isEmpty(bluetoothDevice.getName())) {
            return bluetoothDevice.getAddress();
        return bluetoothDevice.getName();

    protected void incomingData(byte[] data) {

Java Source Code List