[Interest] Problem creating QGuiApplication in an Android Service

King, Jeff Jefferey.King at garmin.com
Thu Apr 9 16:00:00 CEST 2015


I have a Service that calls a function via JNI where I attempt to create a QGuiApplication but the constructor never finishes. I have loaded the necessary QT libraries and plugins for Android similar to how it is done in QtActivity and I don't get any errors, just a dead end.

Android Service -> java thread -> JNI call -> new QGuiApplication...but the constructor never finishes.

I get a "WARNING: QApplication was not created in the main() thread". Is there a way I can create the QGuiApplication on the main thread from inside a Java thread? Would that even matter?

Note: I don't have this problem when using a QCoreApplication.

My goal is to have my Service initialize several manager classes (which utilize QT signals and slots) and then continue to use the QGuiApplication in my "main" function when the QtActivity is started.



Thanks,

-Jeff


________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150409/e8502274/attachment.html>


More information about the Interest mailing list