Answer the question
In order to leave comments, you need to log in
Qt (C++) Android JNI how to call a function and get jbytearray?
Greetings!
There is a JAVA function, for example:
public byte[] read()
{
byte[] data = new byte[100];
Log.i("FFFF", "READ");
....
}
QAndroidJniObject readData = myActivity.callObjectMethod("read", "(V)[B");
if (!readData.isValid()) return;
jbyteArray buf =readData.object<jbyteArray>();
Answer the question
In order to leave comments, you need to log in
QAndroidJniObject readData = myActivity.callObjectMethod("read", "()[B"); - in my opinion, with an empty parameter list, you should not specify void. Read here: journals.ecs.soton.ac.uk/java/tutorial/native1.1/i...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question