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

Droid: MidiManager.GetDevices() returns 0 devices... #62

Open
BradChase2011 opened this issue Feb 15, 2020 · 2 comments
Open

Droid: MidiManager.GetDevices() returns 0 devices... #62

BradChase2011 opened this issue Feb 15, 2020 · 2 comments

Comments

@BradChase2011
Copy link

I was wondering if this is an issue with Xamarin/Mono or why the device count is 0? doing something as simple as this:

            MidiManager manager = GetSystemService(Context.MidiService) as MidiManager;
            MidiDeviceInfo[] devInfo = manager.GetDevices();

to verify why MidiAccessManager.Default.Outputs was throwing a null reference.

Unfortunately GetDevices() on 4 different phones/tablets using the latest VS 2019 always has a count of 0. PackageManager.HasSystemFeature(PackageManager.FeatureMidi) always shows as true.

So I guess my question is, are there any samples to run on android and is there a way to check if this is an issue with all of our devices, managed-midi, or Xamarin.Android. Thanks much! Cant wait to use the library.

@atsushieno
Copy link
Owner

I haven't pushed anything than master version of my own app (already obsolete). I have been Linux based developer and after I left Xamarin I had little chance have hackable Xamarin.Android environment (their build had been broken quite often, Linux is unsupported, and no IDE due to shitty leadership at VS team) and now I'm away from other devices that has Xamarin set up. So my suggestions are all without trying anything:

  1. There is a distance between feature flags and device availability. Android has no pre-installed devices by default (so as Mac). Have some midi device service apps installed (for example OPL3 Midi Synthesizer or Fluidsynth Midi Synthesizer) and see if they show up as MIDI devices on other apps (like Dreamhound).
  2. If they show up, then try with your MidiManager client app and see if they show up.
  3. Whenever possible it's always good to try the same code logic on Android Studio and see if it works. Looks like it can be quite simple two lines of code in Kotlin within default MainActivity in default app template.

@BradChase2011
Copy link
Author

Hey thanks much for the reply. Yea I definitely understand some of those points for sure! So quick question then... Do you happen to have an example of your fluid synth service code? I saw you had a test app, but I couldnt find any code to look at for including the libraries and such.

Thanks again!

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

2 participants