Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for SDK useless in this situation.. #39

Open
renetik opened this issue Sep 4, 2024 · 0 comments
Open

Check for SDK useless in this situation.. #39

renetik opened this issue Sep 4, 2024 · 0 comments

Comments

@renetik
Copy link

renetik commented Sep 4, 2024

I would suggest you to use little bit of chatgpt because its crazy how its written.. I can appreciate a lot of research and testing probably that you made to write this library and that you share it, but style and code quality is very bad.

@Override
   public void onCharacteristicChanged(@NonNull BluetoothGatt gatt, @NonNull BluetoothGattCharacteristic characteristic, @NonNull byte[] value) {
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
           Set<MidiInputDevice> midiInputDevices = midiInputDevicesMap.get(gatt.getDevice().getAddress());
           if (midiInputDevices != null) {
               for (MidiInputDevice midiInputDevice : midiInputDevices) {
                   ((InternalMidiInputDevice) midiInputDevice).incomingData(value);
               }
           }
       }
   }

   @Override
   public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
       if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
           Set<MidiInputDevice> midiInputDevices = midiInputDevicesMap.get(gatt.getDevice().getAddress());
           if (midiInputDevices != null) {
               for (MidiInputDevice midiInputDevice : midiInputDevices) {
                   ((InternalMidiInputDevice) midiInputDevice).incomingData(characteristic.getValue());
               }
           }
       }
   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant