java Programming Glossary: iscopy
Should you call ReleaseStringUTFChars if GetStringUTFChars returned a copy? http://stackoverflow.com/questions/5859673/should-you-call-releasestringutfchars-if-getstringutfchars-returned-a-copy a jstring to a C string const char utf_string jboolean isCopy utf_string env GetStringUTFChars str isCopy ... use string ..... jboolean isCopy utf_string env GetStringUTFChars str isCopy ... use string ... if isCopy JNI_TRUE env ReleaseStringUTFChars.. env GetStringUTFChars str isCopy ... use string ... if isCopy JNI_TRUE env ReleaseStringUTFChars str utf_string Note that..
How to convert jbyteArray to native char* in jni? http://stackoverflow.com/questions/8439233/how-to-convert-jbytearray-to-native-char-in-jni and ReleaseByteArrayElements . Something like boolean isCopy jbyte b GetByteArrayElements env arr isCopy You should be able.. like boolean isCopy jbyte b GetByteArrayElements env arr isCopy You should be able to cast b to char at this point in order..
Calling Android NDK function from Unity Script http://stackoverflow.com/questions/9121781/calling-android-ndk-function-from-unity-script JNIEnv env jobject this jstring URL url URL jboolean isCopy const char szLogThis env GetStringUTFChars env URL isCopy __android_log_print.. isCopy const char szLogThis env GetStringUTFChars env URL isCopy __android_log_print ANDROID_LOG_DEBUG DEBUG_TAG NDK LC s szLogThis..
|