If I want to call a Java method with no parameters using AndroidJNI, what do I do?
Is the below code correct which just passes null instead of a jvalue object?
AndroidJNI.CallIntMethod(javaObj, javaMethodID, null);
If I want to call a Java method with no parameters using AndroidJNI, what do I do?
Is the below code correct which just passes null instead of a jvalue object?
AndroidJNI.CallIntMethod(javaObj, javaMethodID, null);
Yes, it should work. Note, that the last argument is an array of jvalues. Passing empty array there will work too.
You may also find this helpful:
@Aurimas-Cernius By “empty array”, you mean a zero-length array, which is new jvalue[0], right?
Yes. This is what Unity code for AndroidJavaObject/Class does internally. But I think passing null should work too.
@Aurimas-Cernius Thankeeeeeeeeeeew!