I am working on an android project with native code that is supposed to update a List and some other boolean variables in an object.
consider the following code
some java class in my code looks like:
class ReturnObject
{
boolean a, b;
public List<String[]> listA;
}
public class foo
{
public native void someFunction(ReturnObject returnObject);
}
and the native code looks like:
JNIEXPORT void JNICALL Java_com_example_androidtest_TestActivity_someFunction
(JNIEnv * env, jobject jObj, jobject returnObject) {
std::string f = "foo";
// missing code here
// returnObject.add(f) // add like in java
}
How can I set the values of the boolean variables?
and for the the List (knowing my data in the native code are stored as std::string ), how can I invoke add(String[] string) method of the List class from native code?
Aucun commentaire:
Enregistrer un commentaire