0

There is, with Qt 5.6, a simple way to call Java methods in a Qt application : Android extras. As one may guess, this simple way is limited to the Android platform.

Is there a way to write my application such as it is multiplatform(1) and can use JNI calls to Java methods ? Moreover, is there a simple way ? I mean Android extras provides an environment and an API that let me concentrate on coding what my application do. I do not waste time in looking for a way to interface both native and JVM worlds, trying to solve platform dependent problems.

There has been a similar question asked : How can I deploy a mixed C++/Java (JNI) application?

(1) By multiplatform, I mean IOS, Linux, Windows in addition to Android.

Community
  • 1
  • 1
SR_
  • 874
  • 13
  • 31

1 Answers1

0

Not an answere, but an idea:

You could try to take the QtAndroidExtras source code and try to build it on windows/linux/... I don't know if it's even possible, you probably have to modify the pro file, but I think it's worth a try.

The interesting part seems to be this .pri file:

<path_to>\Qt\<version>\Src\qtandroidextras\src\androidextras\jni\jni.pri
Felix
  • 6,885
  • 1
  • 29
  • 54