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

Be able to call JNI method from thread #34

Merged
merged 10 commits into from
Oct 30, 2023
Merged

Be able to call JNI method from thread #34

merged 10 commits into from
Oct 30, 2023

Conversation

EliseChouleur
Copy link
Collaborator

@EliseChouleur EliseChouleur commented Sep 25, 2023

When calling a JNI method from threads on Android you can't only use the path in string format.
You need to save the java class object reference when you have access to it, then you can retreive it from a thread.

See: https://developer.android.com/training/articles/perf-jni#faq_FindClass

@EliseChouleur EliseChouleur merged commit 063f848 into giovanniberti:master Oct 30, 2023
2 checks passed
@EliseChouleur EliseChouleur deleted the jni_from_rust_thread branch October 30, 2023 14:04
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

Successfully merging this pull request may close these issues.

1 participant