On Android platform in my native code I have allocated an int array
mBuffer = new int[BUFSIZE];
I want to send this to Java side, Java method is this
public void WriteBuffer(int[] buffer, int size)
{
}
I call back to java code like this
const char* callback = "WriteBuffer";
mWriteMethod = env->GetMethodID(cls, callback, "([II)V");
This calls the java method its just that in my Java code the buffer is null. As I am really passing a pointer to memory that was dynamically allocated rather than an actual array is probably why it doesn't work but I don't know how to pass a pointer to Java. I need the buffer parameter as an integer array on the Java side anyway.
Anyone know how I can modify the above to get it to work?
Thanks