FlutterMidiCommand
FlutterMidiCommand copied to clipboard
Fix reconnect issue
Previously, we were not able to reconnect to an Android device once we disconnect. That is now fixed.
Changes:
- When removing device from connected device, also remove it from discovered devices and ongoing devices.
- Enable use of await when calling "connectToDevice" by adding result.success (and deleted redundant Result parameter in connectWithStreamHandler)
- Use Bluetooth address instead of toString() as id, because toString() replaces the hexadecimal digits of leftmost 4 bytes (in big endian order) with "XX", e.g., "XX:XX:XX:XX:12:34" from API level 34.
- Upgrade minSdk to 24
How to test:
- Disconnect and reconnect the demo app. The device is now able to connect after disconnect.