InvisibleWrench / FlutterMidiCommand

A Flutter plugin to send and receive MIDI
BSD 3-Clause "New" or "Revised" License
95 stars 50 forks source link

Enable running on devices without midi support #125

Closed Jon-Salmon closed 5 days ago

Jon-Salmon commented 2 weeks ago

Adding this plugin to an app will currently block it's install on any android device that doesn't declare support for "android.software.midi" (quite a few even quite new devices don't support MIDI it turns out). This is blocked becuaes of the feature declerations in AndroidManifest.xml.

This pull request doesn't change this behaviour, but adds a runtime check which means that if a developer overrides the feature decleration in their own app (with something like <uses-feature android:name="android.software.midi" android:required="false" tools:node="replace" />) their app will function fine (as long as they don't call any MIDI methods) on devices that don't support MIDI.

Currently, including this plugin in an app and disabling the feature requirement will crash the app on first launch on android.

Jon-Salmon commented 1 week ago

Thanks, I've added a changelog entry