How To Use C Function On Android With Ndk
I want to use function written in C in an Android app. The function is taken from here. I've learned some basics of android NDK, I can manage to use the function in my Java source,
Solution 1:
OK. Segmentation fault, is a sign of bad pointer manipulation. Change the the code to the example below , and test to see if that works for you: You should change all the
jbyte *cImageIn = env->GetByteArrayElements(env, imageIn, NULL);
jbyte *cImageOut = (jbyte*) env->GetDirectBufferAddress(env, imageOut);
...
env->ReleaseByteArrayElements(env, imageIn, cImageIn, JNI_ABORT);
Post a Comment for "How To Use C Function On Android With Ndk"