3

I have the Symbian/MeeGo project which uses qt-mobility to obtain user's location. The problem is that the following code works fine on Meego (Nokia N9) and doesn't work at all on Symbian (tested on C6-01 and N8). It looks like the GPS adapter starts fine but it can't receive any position info. So we can see the "Satellite" icon near system clock but no coordinates are receiving. I've tested in a different conditions (inside/outside building, different weather conditions) and the result is always the same.

What can be the reason of this behaviour?

My code:

.pro

<...>
CONFIG += mobility
MOBILITY += location
symbian:TARGET.CAPABILITY += NetworkServices Location
<...>

.h

<...>
#include <QGeoPositionInfoSource>
#include <QGeoPositionInfo>
#include <QDebug>
<...>
QTM_USE_NAMESPACE

private:
   QGeoPositionInfoSource* mManager;

private slots:
   void newPos(QGeoPositionInfo);
<...>

.cpp

<...>
 mManager = QGeoPositionInfoSource::createDefaultSource(this);
 mManager->setUpdateInterval(1000);
 mManager->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);

 connect(mManager, SIGNAL(positionUpdated(QGeoPositionInfo)),
            this, SLOT(newPosition(QGeoPositionInfo)));
<...>
void QmlContext::newPosition(QGeoPositionInfo pos){
    qDebug() << pos;
}
<...>
art-o-nawa
  • 329
  • 1
  • 12
  • 1
    How long have you tested it? It can take forever to pinpoint your location. I remember at some time it took over 20 minutes. If you can, use network location to approximate your location, then pinpoint using GPS. – Gerstmann Sep 11 '12 at 10:54
  • Well, QGeoPositionInfoSource::AllPositioningMethods should use them both, right? And I've been testing for about 10 minutes. Anyway these values (more that 5 mins) are not acceptable. So it's all right with the code? – art-o-nawa Sep 11 '12 at 11:00
  • Network location should be enabled from the device settings as well. I agree, it is unacceptable. Unfortunately, I can't comment on the code, my Qt is a bit rusty. – Gerstmann Sep 11 '12 at 11:02
  • @art-o-nawa Have you checked if the phone's own GPS app can show your location? It might be a hardware problem after all. My phone's GPS isn't working at all, for example, no idea why. – sashoalm May 15 '13 at 15:31

0 Answers0