Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.9.1
-
None
-
Windows 10 64 bits.
Compiling to Android using armeabi-v7a (Gcc 4.9).
Build version: android-25.
AndroidManifest.xml:
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"/>
-
8
-
Qt6_Foundation_Sprint 37
Description
QGeoPositionInfoSource positionUpdated signal stops being emitted after a while when used in a Qt Android Service.
Follow the code below:
QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createDefaultSource(0); if (positionSource){ positionSource->setPreferredPositioningMethods(QGeoPositionInfoSource::SatellitePositioningMethods); positionSource->setUpdateInterval(10000); connect(positionSource,SIGNAL(positionUpdated(QGeoPositionInfo)),this,SLOT(slotPositionUpdated(QGeoPositionInfo))); connect(positionSource,SIGNAL(error(QGeoPositionInfoSource::Error)),this,SLOT(slotError(QGeoPositionInfoSource::Error))); positionSource->startUpdates(); }
No error is received to identify what's happening.
This is not so easy to reproduce. positionUpdates signal works fine while you are in the same are (at least 20km radius) from the position you start the service.
I'm able to reproduce this issue every time I travel from one city to other. After around 40kms, slotPositionUpdated stops been called. I have no idea why.
After that, slotPositionUpdated is never called again. I have to restart the service in order to make it work again.
Service doesn't crash.
The same route works perfectly when retrieving gps positioning via java.
Attachments
Issue Links
- relates to
-
QTBUG-71396 QGeoPositionInfoSource does not work from Android service
- Closed