summaryrefslogtreecommitdiff
path: root/src/plugins/position/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: request permissions before location requests or updatesAssam Boudjelthia2020-01-292-28/+34
| | | | | | | | | startSatelliteUpdates() and lastKnownPosition() were not checking Android permissions before trying to access positioning data. Task-number: QTBUG-81689 Change-Id: Ia4d75920b7b07c6782d80a483a3e3961ed9149f5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-201-2/+2
| | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: Icdb8d152c69f32f1050b51bdb7985acc3364fbf4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Ensure QGeoPositionInfoSource::supportedPositioningMethodsChanged() on AndroidAlex Blasche2019-01-044-3/+23
| | | | | | | | | | | This signal was added in Qt 5.12 but never emitted on Android. Due to implementation issues this signal is emitted for each provider change (e.g. twice if network and gps provider were disabled when the entire location service is disabled) Task-number: QTBUG-66427 Change-Id: I820b3187bfd8b8ab4facb053e2019e4f5c9736d0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix QGeoPositionInfoSource::supportedPositioningMethods() on AndroidAlex Blasche2019-01-021-1/+1
| | | | | | | | | | | | So far this method returned all existing positioning methods and not the available methods. Availability is defined by customer settings like turning location off or only enabling GPS based positioning. Task-number: QTBUG-66427 Change-Id: Id5b58ee4cc0274bae90ed2e363cb5cf2a287dc05 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Collect vertical position accurancy detailsAlex Blasche2018-12-141-1/+15
| | | | | | | | | Android's platform API supports this piece of information since API version 26. Fixes: QTBUG-64689 Change-Id: I09cce4979f3f754cb9af11281de2fe0050b74da1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix warnings in jnipositioning.cppAlex Blasche2018-12-101-27/+28
| | | | | | | | | Since Android uses a new NDK/compiler since 5.12 there were many more warnings which had serious implications. Examples are potentially flawed downcasts, nullptr warnings and old style casting operators. Change-Id: I53989fa9120c8b7e865d23255d1fcdf229e7f2f3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix horizontal accuracy comparison for competing position resultsAlex Blasche2018-12-051-1/+1
| | | | | | Fixes: QTBUG-72291 Change-Id: Id2c2ce04e12f1470b08e93ec3512ab39b4054f7d Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix warning in Android position pluginAlex Blasche2018-12-051-1/+1
| | | | | | | | qtlocation/src/plugins/position/android/src/qgeopositioninfosource_android.cpp:226: warning: implicit conversion loses integer precision: 'qint64' (aka 'long long') to 'const int' Change-Id: I64df529028aac88f1b6e05c72cfba0a9ed6c9a7f Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Declare/Register metatype for QGeoPositionInfoPaolo Angelelli2018-03-231-2/+0
| | | | | | | | | | Instead of doing it all over the place, declare it in qgeopositioninfo.h and register it in QGeoPositionInfoSource() as well as in positioning.cpp Task-number: QTBUG-65937 Change-Id: I819af3393921bdc9ca46832d5b4181d41546dac0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-202-4/+7
|\ | | | | | | Change-Id: I9adfdf056dd04f33e9fbd01bcb2ca2ad75e95007
| * Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-031-2/+2
| | | | | | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3Liang Qi2017-10-261-2/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9a3d7ec0bb203ac8b5bd483af3973510ca33c4a9
| | * Android: check positioning listener not nullVyacheslav Koscheev2017-10-241-2/+5
| | | | | | | | | | | | | | | | | | Change-Id: I8b491dc1a3b9056c9a15d6814b72e52e37132dda Reviewed-by: Sergey A. Galin <s.galin@2gis.ru> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Android: remove support for local/debug deploymentJake Petroules2017-09-064-22/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: Ie562ba8120c38ef2c0be546db8f0ce65718816f4 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-0/+4
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3241efba9c3a32a4a097a67fd6432c45aad8e6ef
| * Android: fix resolving null locationManagerVyacheslav Koscheev2017-06-291-0/+4
| | | | | | | | | | | | Change-Id: I5be4c3af8cedd6755296bc9b445562549784c050 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-3/+3
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Set UTC flag for Android position timestampsAlex Blasche2017-03-141-1/+1
| | | | | | | | | | The platform provides the data in UTC time. However the default QDateTime::fromMSecsSinceEpoch creates the timestamp in LocalTime by default. The patch corrects the Timespec for the time stamp. Task-number: QTBUG-59158 Change-Id: Iaeceb0de2273b40a1815959b514d702670180aba Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Guard against unprotected javaVM pointer usageAlex Blasche2017-03-091-1/+1
| | | | | | Task-number: QTBUG-59010 Change-Id: Iea5f160718fd668665d4870fe1b82d608cf13d8c Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Set parent to timers in position pluginsVyacheslav Koscheev2017-02-071-1/+1
| | | | | | | | | QTimer can be started and stoped only from owner thread. So, if we'll do moveToThread for parent object, then we need QTimer to have a parent to change its owner thread too. Change-Id: Iac57d42b6e72118f31d93f15662403f681925f88 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'gerrit/5.7' into 5.8Alex Blasche2016-11-022-15/+19
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative_ui/BLACKLIST Change-Id: I0f6c9228c899c4d1d55fffc596c661ee0f6c2b66
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-012-15/+19
| |\ | | | | | | | | | Change-Id: I0880e4aa40fbf9fe0bb639f7fd77a52044e91a6e
| | * Fix error status for QGeoPositionInfoSourceAndroidVyacheslav Koscheev2016-09-302-15/+19
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54844 Change-Id: I8abdbb47c883099e7749c57e5010be1aa999e373 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTimeThiago Macieira2016-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a37062ee3e001 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Add capability to ask for Location permission at runtimeAlex Blasche2016-09-212-1/+30
|/ / | | | | | | | | | | | | | | This is required since Android v23+. Task-number: QTBUG-55988 Change-Id: I41777cfbb6fde38dc0f8045c9320f420bb0b43a2 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Michal Klocek2016-07-284-4/+9
|\ \ | |/ | | | | Change-Id: I37542960aa091ab2074914a2cebb8c5114237a26
| * Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I0401553f80c10b14b837a96dc979d0e7341396ea Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Android: Reduce the minimum update interval to 50msAlex Blasche2016-06-243-4/+4
| | | | | | | | | | | | | | | | | | The previous 1000ms were to high for satellite and position updates. Task-number: QTBUG-54026 Change-Id: I35f6452cfb714a8d69d55dd126067de8d2c3b30c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | This module doesn't need an Activity to work, a Context object is enoughBogDan Vatra2016-07-261-3/+2
| | | | | | | | | | | | Task-number: QTBUG-54506 Change-Id: Ic1fd0d3bc63e9fcdf24a29b26a3be3746bbf45ab Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-081-5/+5
|\ \ | |/ | | | | Change-Id: I18bb1c341e7d87cd1d649f2c3fc9c50141c6a1a9
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-5/+5
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ia0fcc7b40cbd80bde8edddcf8253b3136ed851ff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-36/+66
|\ \ | |/ | | | | Change-Id: I23c874c5dcd0452142c3cf8abff65415ad31a1e7
| * Fix endless location requestingVyacheslav Koscheev2016-01-251-36/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problem of lost positioning listeners, which was registered in LocationManager, but does not persist in the `runningListeners` collection. We can't call LocationManager.removeUpdates() for those listeners, that are not in `runningListeners` and that's why LocationManager never ends to update location for them. Listener can be registered in LocationManager and not added to `runningListeners` collection at least in the following cases: 1. `startUpdates()` was called when location providers was disabled in system. 2. `startUpdates()` was called twice, without `stopUpdates()` Change-Id: If6777677cbb6f2ad9107fe2ac8496b7cdbb2d8d4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-209-126/+180
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Iaee1a5fd53291752a1891710ee375ca32778b142 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-082-0/+22
| | | | | Change-Id: Id3ef277b5610a45ffa42850dd9415e963ed45285 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Skip loading real plugins in testsLaszlo Agocs2015-09-091-1/+2
| | | | | | | | | | Introduce a new plugin metadata field "Testable" that can be used to indicate that using the plugin in question in test runs (e.g. in a CI environment) is dangerous. We can then check for QT_QTESTLIB_RUNNING and skip the plugin in question. Change-Id: Iabe9f1600d7274e0e9224dc49d02aa2e5d3cabd6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update contact URL in all license headers to qt.ioAlex Blasche2015-02-189-9/+9
| | | | | Change-Id: Ia1e333be7fec8898de609d9b9303b1ad7687632e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update BSD and LGPLv2.1 licensesAlex Blasche2015-02-189-27/+27
| | | | | | | | - Removes subsidiary extension from Qt Company - Replaces remaining occurrences of Digia in BSD and LGPLv2.1 Change-Id: I7467a6744af7d1c3aef3c29118f219399162a18c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update all LGPLv2.1 license headers in source to latest versionAlex Blasche2015-02-159-36/+36
| | | | | | | | | | | This affects all QtPositioning related code and the test code in the entire repository. The Qt Company is set as new copyright owner and the copyright year is bumped to 2015. Change-Id: Iee0e990680683c20f5920e49cc1063ea9349e2cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: A new positioninfosource is always initialized with NoErrorAlex Blasche2014-10-241-1/+1
| | | | | | | Task-number: QTBUG-41873 Change-Id: Ic6efadbdf92a2d43151089509708556e48748120 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-249-172/+100
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Iedee2507ab1bd46788409a98505d7be510253110 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix the names of the plugin factory classes for static plugin loadingAlex Blasche2014-06-251-1/+1
| | | | | | | | | | | | | | | This breaks positioning on IOS and any other statically build Qt versions. At the same time rename the positionpoll factory class to a more appropriate name to avoid confusion. [ChangeLog][QtPositioning] [iOS] Fixed link error of positioncl and positionpoll plug-in. Task-number: QTBUG-39843 Change-Id: Ic3d5687571cd9e7a531f9958675b895cf22ac13e Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Fix crash on S4 when running Satellite and Position updates concurrentlyAlex Blasche2014-05-232-11/+23
| | | | | | | | | | | | | | | | | This was caused due to unsynchronized access of data between two threads. The Java satellite updates were sent before the receiving Qt thread could finish its regular startup. As a consequence the received updates could not be mapped to a receiving C++ class. This patch synchronizes the startup and setup of the two threads and ensures that the relvant data setup on the C++ side is done before the update thread is started. In addition some minor debug helpers were added for future references. Task-number: QTBUG-39082 Change-Id: I1f24ddfcef038fa000801ddb6a3ea0959370f0d3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add PLUGIN_CLASS_NAME declarations to plug-in projectsAlex Blasche2014-04-231-0/+1
| | | | | | | | | | This is required for automatic static linking and deployment. The test plug-ins are excluded from the automation based on the assumption that they are usually not needed. Change-Id: I7658c624101e3273767c1c10d77a87c89d5801ba Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Fix crashes due to insufficient resource cleanupsAlex Blasche2014-04-021-1/+7
| | | | | | | | Task-number: QTBUG-37789 Change-Id: I9971fd1e9e63dedbbfe86e567e701bab688cf144 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Don't use QString if not required (Performance improvement)Alex Blasche2014-01-151-3/+7
| | | | | | | Change-Id: I80cf4dcd98c45169b31ee1659122020ce27b29ea Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Fix crash while retrieving GPS based location.Alex Blasche2014-01-151-1/+2
| | | | | | | | | | | The satellite backend was not properly guarded from the location backend. As a consequence satellite updates were triggered while the user only requested position updates. This caused uninitialized satellite code to be exeuted which caused an abort. Change-Id: I4a7511d49ba795fb6a4fc8e9c723ef1260c5c9a5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Avoid unnecessary methodId lookups (use a cache instead)Alex Blasche2014-01-151-16/+45
| | | | | | | | This is a performance improvement. Change-Id: If3115078ae3247f9f888982b922a77c9cd92fe91 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Use constants to reflect type of occurred errorAlex Blasche2014-01-031-22/+30
| | | | | | Change-Id: I9b4ded2742c513ecfe491231341a8f3a9178929b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QGeoSatelliteInfoSource backend for AndroidAlex Blasche2014-01-038-32/+590
| | | | | | | | | | | | | | Android supports status enquiries about GPS/GLONASS satellites in range. Task-number: QTBUG-34102 [ChangeLog][QtPositioning][QGeoSatelliteInfoSource] Android backend added. Android devices can retrieve information about the currently accessible GPS and GLONASS satellites. Change-Id: Ia3627fdcf948586f9e6f04aa64bfc9548fc895e0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>