[Interest] How to use QtPositioning on Android

Martin Koller kollix at aon.at
Tue Aug 12 17:30:11 CEST 2014

I'm trying to use QGeoPositionInfoSource on Android with Qt5.3.1
built on a Linux Box using Ministro.

When I do this with a simple test program using qtcreator,
QGeoPositionInfoSource::availableSources() shows "android", which is fine.
However, testing with our large application, it gives an empty list.

As the large app does neither use qtcreator nor qmake (we use cmake),
can someone tell me what I need to configure (AndroidManifest.xml or any other .xml file) so that my app shows
the available "android" positions plugin ?

Note that I want to use Ministro.
I see in the test app's AndroidManifest.xml file the following lines, however
I can not find any documentation about what these lines are good for
(especially the ones mentioning QtSensors.jar and QtPositioning.jar).
What do they do and how do I need to use them.

            <meta-data android:name="android.app.use_local_qt_libs" android:value="0"/>
            <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
            <meta-data android:name="android.app.load_local_libs" android:value="plugins/platforms/android/libqtforandroid.so:plugins/sensors/libqtsensors_android.so:plugins/position/libqtposition_android.so"/>
            <meta-data android:name="android.app.load_local_jars" android:value="jar/QtAndroid.jar:jar/QtAndroidAccessibility.jar:jar/QtAndroid-bundled.jar:jar/QtAndroidAccessibility-bundled.jar:jar/QtSensors.jar:jar/QtSensors-bundled.jar:jar/QtPositioning.jar:jar/QtPositioning-bundled.jar"/>
            <meta-data android:name="android.app.static_init_classes" android:value="org.qtproject.qt5.android.sensors.QtSensors:org.qtproject.qt5.android.sensors.QtSensors:org.qtproject.qt5.android.positioning.QtPositioning:org.qtproject.qt5.android.positioning.QtPositioning"/>

It's also not clear if these lines are used at all when using Ministro.

Best regards/Schöne Grüße

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\                        - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at

More information about the Interest mailing list