I’m confused with the MidiDemo of JUCE running on Android. When I run the demo on my device, the virtual midi input ports of other apps (which should receive midi data) are listed under the input list of the MidiDemo. Instead they should appear under the output, so that you could send data to the input of other apps.
Tests with the midi suite
apps from android midi suite: https://github.com/philburk/android-midisuite
Midi Keyboard: https://play.google.com/store/apps/details?id=com.mobileer.midikeyboard
Midi Scope: https://play.google.com/store/apps/details?id=com.mobileer.example.midiscope
or Midi Synth Example: https://play.google.com/store/apps/details?id=com.mobileer.midisynthexample
Both Midi Scope and the Synth Example have virtual midi inputs (but no outputs), which works correctly with the Midi Keyboard app.
After fiddling around with JUCE I renamed the path from modules\juce_audio_devices\native\java\app\com\roli\juce\JuceMidiSupport.java to modules\juce_audio_devices\native\javacore\app\com\roli\juce\JuceMidiSupport.java - just for my changes to take effect.
In the JuceMidiSupport.java I changed all the occurrences of MidiDeviceInfo.PortInfo.TYPE_OUTPUT to MidiDeviceInfo.PortInfo.TYPE_INPUT and vice versa. Basically swapping all midi input and output ports…
Now in the MidiDemo inter-app (virtual) Midi works as expected. Can somebody confirm if it works also with Bluetooth Midi?
Midi over USB works also with or without the changes. Hmm I guess, if a midi device has both input and output ports, then JUCE still can open the ports correctly…
Is this just me? Or there is a bug in JUCE?
Samsung S9 (Android 28)