Created
April 29, 2015 15:27
-
-
Save MaximAlien/4c3355a58d5835ac7d20 to your computer and use it in GitHub Desktop.
[Android] [JNI] Convert jstring to char *
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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