[Android-development] Using Qt libs in native android app
Shrikant Dhumal
teck.shri at gmail.com
Mon Nov 2 22:28:25 CET 2015
Hello there,
I have an unusual situation in terms of how one uses Qt API.
I have a native Android App (implemented using Android SDK) and I am
replacing its business logic using Qt API. I do not want to change my UI
that is written using native Android Java classes.
I plan to use some of the Qt backend classes (that is a requirement) so, I
intend to use only QtCore (no UI or other Qt module).
One of the backend class I intend to use is, QStandardPaths.
When I call following API's I get empty strings
QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation);
QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation);
However, when I tried same API in Qt Android examples, I am getting
non-null paths.
When I looked into the code of QStandardPaths for Android to understand the
implementation, I realized that the QStandardPaths relies on presence of Qt
activity class that is part of QPA (on Android). Is my understanding
correct?
Note: getExternalFilesDir() method uses "QtAndroidPrivate::activity()" and
"applicationContext()" to determine the paths.
Is there a means to successfully use Qt backend classes in a native Android
App?
- Shrikant D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20151102/2dcb9f13/attachment.html>
More information about the Android-development
mailing list