link : http://itouchdb.tistory.com/99
또한 안드로이드에서 C소스를 JNI로 변경할 때 아래와 같이 char형으로 변경할 수 있습니다.
//jstring형을 char형으로 변환
contentPath = (*env)->GetStringUTFChars(env, jFilePath, 0); // jstring을 char형으로 변경
pli_strcpy(contentName, contentPath);
(*env)->ReleaseStringUTFChars(env, jFilePath, contentPath); // 메모리 해제
또한 안드로이드에서 C소스를 JNI로 변경할 때 아래와 같이 char형으로 변경할 수 있습니다.
//jstring형을 char형으로 변환
contentPath = (*env)->GetStringUTFChars(env, jFilePath, 0); // jstring을 char형으로 변경
pli_strcpy(contentName, contentPath);
(*env)->ReleaseStringUTFChars(env, jFilePath, contentPath); // 메모리 해제
'Android' 카테고리의 다른 글
error ==> Your project contains error(s), please fix them before running your application (0) | 2013.10.08 |
---|---|
error => resource `xxx` is out sync with file system (0) | 2013.10.08 |
timer in android (0) | 2013.10.08 |
libscew on android (0) | 2013.10.08 |
emulator bash setting (0) | 2013.10.08 |