Sample code for using Android JNI.
- Generate C/C++ header file
Execute the command below in project root directory.
$ javah -classpath bin -d jni net.pikanji.jnitest.JniTest
Output isjni/net_pikanji_jnitest_JniTest.h
- Build native code
Execute the command below in project root directory.
$ <ndk_dir>/ndk-build
https://github.com/pikanji/JniTest
- minimum -- Minimum code demonstrating Android JNI usage.
- call_j -- Demonstrates calling a Java method from native code.