Some NDK/JNI/Android tests
- To enable CheckJNI run
adb shell setprop debug.checkjni 1
- https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/types.html
- http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/sync.html
- https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzaha/nmthread.htm
- https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html
- http://w01fe.com/blog/2009/05/c-callbacks-into-java-via-jni-made-easyier/
- https://stackoverflow.com/questions/27923917/cant-execute-javavm-detachcurrentthread-attempting-to-detach-while-still-r/
- https://stackoverflow.com/questions/26534304/android-jni-call-attachcurrentthread-without-detachcurrentthread
- https://stackoverflow.com/questions/35633213/why-does-my-android-app-crash-when-my-threads-exit
- https://stackoverflow.com/questions/6372102/what-is-the-difference-between-pthread-self-and-gettid-which-one-should-i-u
- https://medium.com/@unmeshvjoshi/how-java-thread-maps-to-os-thread-e280a9fb2e06
- https://stackoverflow.com/questions/18056347/jni-calling-java-from-c-with-multiple-threads
- Using CheckJNI