Using JNI without running into disaster
summary
JNI lets Android apps call C from Java and vice versa, but it's easy to misuse—causing type errors, garbage-collector issues, and thread-safety bugs. The talk examines those specific pitfalls (typing, GC interactions, thread-safety) and shows how to avoid them by using C++ features and patterns, with concrete examples drawn from building a system UI for mixed-reality headsets on Android.
AI-written summary · about
chapters (8)
- 0:00JNI introduction
- 6:24What is JNI
- 8:52Weak typing trap
- 14:56Reference management
- 20:38JNI environment and threads
- 26:13ClassLoader trap
- 29:46JNI best practices
- 32:40Conclusion








