Android: JS to JNI type conversion implementation