×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    43

    QtMobility/QtLocation doesn't appear to be activating the GPS device

    Hi,

    I'm working in Carbide 2.3 with Qt 4.7 and Qt-Mobility 1.0.2. The simple demonstration program using QGeoPositionInfoSource isn't turning on the GPS device. I'm running the program on the N97.

    Did something change in this release?


    Jim

  2. #2
    Registered User
    Join Date
    Jan 2010
    Posts
    43

    Re: QtMobility/QtLocation doesn't appear to be activating the GPS device

    These are the capabilities I'm using:

    symbian: {
    TARGET.UID3 = 0xE36520C6
    TARGET.CAPABILITY = NetworkControl MultimediaDD NetworkServices ReadUserData WriteUserData LocalServices UserEnvironment Location ReadDeviceData WriteDeviceData
    }

    This is part of the code:

    ContactsTest::ContactsTest(QWidget *parent)
    : QMainWindow(parent),
    contactManager(new QtMobility::QContactManager("symbian")),
    source(QGeoPositionInfoSource::createDefaultSource(parent))
    {
    ui.setupUi(this);

    connect(source,SIGNAL(positionUpdated(QGeoPositionInfo&)),this,SLOT(OnPositionUpdated(QGeoPositionInfo&)));

    source->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
    source->setUpdateInterval(1000);
    source->startUpdates();

    QList<QtMobility::QContact> privateContactList=contactManager->contacts();


    }

    I'm using S60 5th Edition. I have code using the gps device working fine with the previous Qt versions. There's no gps activation when I run this program. Is there anything missing here related to the capabilities?


    Thanks
    Last edited by jmclaurin11; 2010-10-22 at 16:07. Reason: add details

  3. #3
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QtMobility/QtLocation doesn't appear to be activating the GPS device

    Have you included location API in your .pro file ?

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    43

    Re: QtMobility/QtLocation doesn't appear to be activating the GPS device

    Yes, location is in the MOBILITY+= list. I know there would be a linking error because of the undefined symbols. I extracted the libs from the zipped file containing the qt-mobility binaries. First I built the source at the command line but not all of the libraries compiled.

  5. #5
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QtMobility/QtLocation doesn't appear to be activating the GPS device

    Hi, to include Location API follow steps from here : http://www.forum.nokia.com/document/...cation/02.html

    You should write below in your .pro file :

    Code:
    CONFIG += mobility
    MOBILITY = location
    
    symbian: {
        TARGET.CAPABILITY = Location
    }
    Best regards,

  6. #6
    Registered User
    Join Date
    Jan 2010
    Posts
    43

    Re: QtMobility/QtLocation doesn't appear to be activating the GPS device

    In the SDK source code this if(...) statement is failing. If I allow it to go through the if(...) statement a location timeout signal is emitted. When another application is using the device it shares the data and returns the last location update. I have signal handlers setup. Can someone tell me why this would happen?

    void CQGeoPositionInfoSourceS60::startUpdates()
    {
    // This fails so I never get the updates from the gps device.

    if (receivers(SIGNAL(positionUpdated(QGeoPositionInfo))) > 0 && !mStartUpdates)
    mRegUpdateAO->startUpdates();


    mRegularUpdateTimedOut = false;
    mStartUpdates = true;
    }


    Thanks

Similar Threads

  1. NokiaQt SDK and Qtmobility builds for the emulatore and not for Symbian device
    By sirusbasevi in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2010-09-01, 10:48
  2. Error with QtMobility 1.0 after succesfully intall QtMobility tp2
    By Estel in forum [Archived] Qt Mobility Project
    Replies: 0
    Last Post: 2010-06-21, 21:21
  3. QtLocation
    By rbaltazar in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2009-11-10, 12:01
  4. gps maps for nokia gps enabled device
    By galaxy_j2me in forum Mobile Java General
    Replies: 1
    Last Post: 2009-06-03, 06:46
  5. about auto activating gps service
    By kristinasharma1 in forum General Development Questions
    Replies: 1
    Last Post: 2009-01-10, 13:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×