[SOLVED] Not recieving notifications from QGeoSatelliteInfoSource
-
Hi,
I'm trying to get notifications from a QGeoSatelliteInfoSource. I'm using Qt Mobility 1.1.
I'm trying the following:
When I start receiving updates from the QGeoPositionInfoSource, I create a new instance by QGeoSatelliteInfoSource::createDefaultSource(). Then I start updates and connect its signals to appropriate slots.@
satSource = QGeoSatelliteInfoSource::createDefaultSource(this);
if (satSource) {
satSource->startUpdates(); connect(satSource,SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)),this,SLOT(satellitesUpdated(QList<QGeoSatelliteInfo>)));
@But the signals are never emitted and I never receive any updates.
In the emulator it works fine. And if I start the standard location app on the phone, and via that asks for satellite info and THEN launch my app, THEN I get satellite info.
Has this something to do with I need to start some sort of plugin in order to receive satellite info?
-
Found a solution. The problem seems to be related with some sort of timeouts. If the signals and slots are connected long before a GPS fix is established, then no signals will be emitted.
Instead one could try to request updates periodically with a timeout, and when the request triggers the emitting of signals, then you can connect the slots.