Initial working Android/JNI version