-
Notifications
You must be signed in to change notification settings - Fork 54
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
Expose JavaVM
and Activity
reference that can be used to make JNI calls
#60
Comments
This enables applications to make JNI calls without needing the `ndk-context` crate - which we would like to deprecate. Fixes: rust-mobile#60
@rib is the intent to have "random" crates ( |
This enables applications to make JNI calls without needing the `ndk-context` crate - which we would like to deprecate. Fixes: rust-mobile#60
Ideally I think crates like Instead it should either be possible to initialize This way it's the application that glues these things together and they can decide whether they will e.g. use |
At least explicitly passing
Sounds good, it already uses the
Yup that is exactly my suggestion, specifically regarding "android"-targeted apps that might as well run within Termux but not have access to the |
So that we can port crates away from the
ndk-context
crate we should expose theJavaVM
and AndroidActivity
reference needed for applications to use JNI to also call Java/Kotlin APIs from their native code.One reason why we want to deprecate the
ndk-context
crate is that it relies on global static state for sharing theActivity
reference which makes it impossible to support applications that may have more than one native activity running in the same process.The text was updated successfully, but these errors were encountered: