I\'ve found return byte array in jni android? which has a simple example:
JNIEXPORT jbyteArray JNICALL Java_Test_returnArray (JNIEnv *env, jobject This) {