Hello.
I am using Qt 5.2 for Android. I have an application that uses some specific functions written on Java. In Qt 5.1, there was QtActivity.java file, which was created automatically by Qt Creator IDE. So, I just modified its contents and used JNI for calling functions from C++ code. In Qt 5.2, this file is not a part of a project anymore, building project erases any changes in this file.
Is there any way to force android to use my own subclass of QtActivity instead of the QtActivity itself?
And how to attach user-written java class to a project?
I've created MyActivity.java file in myproject/myandroidsrc folder and added these lines into my .pro file:
I have tried to use QAndroidJniObject, but there is always an error occurs: Invalid indirect reference someHexNumberHere in decodeIndirectRef.Qt Code:
QT += androidextras ANDROID_PACKAGE_SOURCE_DIR = $$PWD/myandroidsrcTo copy to clipboard, switch view to plain text mode
Any help is appreciated.
P. S. Sorry, I am not good in Java and English.
Bookmarks