Transfer value from native cpp to java when using JNI

Asked 1 years ago, Updated 1 years ago, 95 views

Hello, I'm making an application using Android Studio. I want to implement the part that transfers the value between native-lib cpp and Java class using jni Is there a way to transfer the value obtained in the for statement to Java class within the cpp function? If you return in the for statement, the for statement ends right awaycrying Until the for statement ends in the given range, the value should be delivered continuously, is there a way? It's not Java -> native cpp, it's Java!

jni java android

2022-09-22 20:11

1 Answers

You can embed the jvm.

It is easy to run jvm using jni in native application.

You can pass or share variables to the jvm that you ran.


2022-09-22 20:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.