I have a JNI C function that has an jbyteArray input parameter. This is a byte array of size 128 that I wish to compare with a #define string. How do I achieve this?
I tried to memcpy the jbyteArray to an unsigned char data[128] and then do a memcmp() of data and the #define, but the memcpy crashed my app.
Thanks.
I ended up copying the jbytearray using GetByteArrayRegion instead.