Hi,
I want to call a method with null in its argument. Trying to pass nullptr throws an error in the IDE saying: 'void *' is not a valid JVM type.
What is the appropriate way to do this?
To illustrate, the Java method looks something like this:
private void nativeCallback(byte[] data) {
if (data == null) {
//do something
} else {
//do something else
}
}
And the JNI call looks like this:
METHOD_nativeCallback = env->GetMethodID(cls, "nativeCallback", "([B)V");
env->CallVoidMethod(obj, METHOD_nativeCallback, nullptr);