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

Android support? #4

Open
AlGrenadine opened this issue Jan 3, 2020 · 12 comments
Open

Android support? #4

AlGrenadine opened this issue Jan 3, 2020 · 12 comments

Comments

@AlGrenadine
Copy link

Title says it all :)

@jcelerier
Copy link
Member

hello ! that would be nice - I would expect that it "just works" on android as Android uses ALSA behind the scene if I'm not mistaken but I do not knjow at all on iOS - is it not CoreMidi there too ?

@AlGrenadine
Copy link
Author

Yes coremidi seems to work on iOS but alsa doesn't on Android afaik

@jcelerier
Copy link
Member

damn I hope we don't have to call Java APIs to make it work

@AlGrenadine
Copy link
Author

I fear you have to :(

@jcelerier
Copy link
Member

just checked and apparently no ! android NDK comes with a C/C++ midi API:

https://developer.android.com/ndk/reference/group/midi

@atsushieno
Copy link
Contributor

In case it matters, Android Native MIDI API is available only in Android 10 or later.

@jcelerier
Copy link
Member

argh :) communicating through JNI is an... exercice in patience to say the least (and I have very few experience with it).
I'd be ok with trying to do it with the more recent API, then if someone wants to contribute support for the java-based API it'll be 100 % welcome but I don't have the courage for it

@jcelerier
Copy link
Member

50% done, I could make the library build for iOS, there were a couple minor things.

@jcelerier
Copy link
Member

the code that seems required for android is .... yuck yuck yuck

https://github.com/thestk/rtmidi/blob/master/RtMidi.cpp#L4838

@AlGrenadine
Copy link
Author

the code that seems required for android is .... yuck yuck yuck

https://github.com/thestk/rtmidi/blob/master/RtMidi.cpp#L4838

Excellent :)

@jcelerier
Copy link
Member

jcelerier commented Feb 7, 2024

https://github.com/android/ndk-samples/blob/main/native-midi/app/src/main/cpp/AppMidiManager.cpp

definitely not ahah, I'd rather like to avoid having some weird JNI calls and Java object discovery in the middle. Maybe it can be part of some example though - the end-user would be able to implement these calls however they see fit.

@AlGrenadine
Copy link
Author

Anyway, now it's implemented in rtmidi it's still good news :)

@jcelerier jcelerier changed the title Android and iOS support? Android support? Apr 5, 2024
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

3 participants