Skip to content

Instantly share code, notes, and snippets.

@MaximAlien
Created April 29, 2015 15:27
Show Gist options
  • Save MaximAlien/4c3355a58d5835ac7d20 to your computer and use it in GitHub Desktop.
Save MaximAlien/4c3355a58d5835ac7d20 to your computer and use it in GitHub Desktop.
[Android] [JNI] Convert jstring to char *
JNIEXPORT void JNICALL method_name
(JNIEnv *env, jobject obj, jstring jstr)
{
const char* ch = env->GetStringUTFChars(jstr, 0);
env->ReleaseStringUTFChars(jstr, ch);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment