Friday, December 12, 2014

Android NDK jstring char*로 변환

JNIEXPORT void JNICALL Java_ClassName_MethodName(JNIEnv *env, jobject obj, jstring javaString)
{
    const char *nativeString = (*env)->GetStringUTFChars(env, javaString, 0);
    // use your string
    (*env)->ReleaseStringUTFChars(env, javaString, nativeString);
}

No comments:

Post a Comment