×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    17

    Qt Mobility Location on Nokia N97

    Hi,

    I've develop one sample application that obtain current location at start up. This example runs ok on Qt simulator (Nokia Qt SDK beta), but when I try to run it on my device (Nokia N97 Mini), the application crash.

    I've installed Qt 4.6.2 for symbian and QtMobility on device (I installed qt_installer.sis and qtmobility.sis), but it appears to be missing something to install.

    Somebody can help me??

    Thanks in advance.
    Regards.

  2. #2
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    It´s the same for me :-((

    I hope anybody can help.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    Santi, is your phone unlocked (libre) and running romPatcher to allow apps instalation (like mine)? me huele que tiene que ser algo de eso...

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    17

    Re: Qt Mobility Location on Nokia N97

    Hi,

    My phone is unlocked, and I use application TRK for install applications.

    I don't know about romPatcher... what is it?


    My problem occurs after install, when the application starts up... (después de instalar, cuando ejecuto la aplicación, da un pete... :-))

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    RomPatcher: http://www.finestfones.com/2008/05/r...free-your.html
    enables you to install unsigned apps and so on.

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    Santi, did you fix the problem??
    Should it be the firmware version? I have 21.05 latest accepted by orange :-((

  7. #7
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: Qt Mobility Location on Nokia N97

    It could be a Symban capabilities problem - the details are on the Mobility quick start page in the documentation.

    Let me know if that helps.

    Cheers,

    Dave

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    no way...
    The systeminfo example works fine (in both the emulator and the device) but if I change to location it panicks on the device (but it works on the emulator). This is my try:

    //-------------------------
    #include <QtGui/QApplication>
    #include "mainwindow.h"

    #ifdef Q_OS_SYMBIAN
    #include <qgeopositioninfosource.h>
    #else
    #include <QGeoPositionInfoSource>
    #endif

    QTM_USE_NAMESPACE //(2)


    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;
    qDebug("hola");
    // QSystemInfo s;
    // qDebug(s.currentCountryCode().toAscii());
    QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource(&a);
    if (source){

    qDebug("source");

    } else { qDebug("no source");}


    // and the .pro----------------------------------------
    QT += core gui

    TARGET = test
    TEMPLATE = app


    SOURCES += main.cpp\
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    CONFIG += mobility
    MOBILITY = location

    symbian {
    TARGET.UID3 = 0xe8b516b9
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }

    // and the debug message---------------------------------------------
    Deploying application to 'Nokia 5800 XpressMusic USB (COM2)'...
    Copying install file...
    Installing application...
    Starting application...
    Application running with pid 1280.
    [Qt Message] hola
    Process 1280, thread 1281 stopped at 0x80296bf1: Thread 0x501 has panicked. Category: Lbs Client Fault; Reason: 6
    Finished.


    thanks for help

  9. #9
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: Qt Mobility Location on Nokia N97

    The capabilities listed for System Info are for the worst case - when you use all of the functionality of System Info. If you're using a smaller part of System Info you won't need as many capabilities.

    The code you included will panic because your program lacks the "Location" capability.

    Try changing
    # TARGET.CAPABILITY +=
    to
    TARGET.CAPABILITY += Location
    in your .pro file.

    Cheers

    Dave

  10. #10
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt Mobility Location on Nokia N97

    I can´t believe it, it works!
    :_)

    Thanks so much

  11. #11
    Registered User
    Join Date
    Apr 2010
    Posts
    17

    Re: Qt Mobility Location on Nokia N97

    Hellow,

    Sorry, but I haven't read this thread the last days.

    About Mobility on my device, I have included "Location" capability in the .PRO file, but my application does anything, it doesn't obtain data of location.

    This is my code in .PRO file:


    CONFIG += mobility
    MOBILITY = location


    symbian: {
    TARGET.UID3 = 0xe8355e9c

    TARGET.CAPABILITY ="NetworkServices ReadUserData WriteUserData Location UserEnvironment"
    TARGET.EPOCHEAPSIZE = 0x020000 0x8000000

    LIBS += -lcone \
    -leikcore \
    -lavkon
    }

    And this is the code on my QMainWindow class:



    .....

    m_location = QGeoPositionInfoSource::createDefaultSource(this);
    connect(m_location, SIGNAL(positionUpdated(QGeoPositionInfo)),
    this, SLOT(posicionActualizada(QGeoPositionInfo)));
    connect(m_location,SIGNAL(requestTimeout()),this,SLOT(timeOutLocalizacion()));
    if (m_location) {
    m_location->startUpdates();
    }
    ....

    void MainWindow:osicionActualizada(QGeoPositionInfo gpsPos)
    {
    QGeoCoordinate m_coordinate = gpsPos.coordinate();
    if (m_coordinate.isValid()) {
    this->locaUserLong.setNum(m_coordinate.longitude());

    this->locaUserLat.setNum(m_coordinate.latitude());
    m_location->stopUpdates();

    QMessageBox::critical(this, "Posicion Actual: ",
    "Logitud: "+this->locaUserLong+" ; Latitud: "+this->locaUserLat, QMessageBox::Ok);
    }
    }


    On simulator, the QMessageBox appears showing location data, but on device the application doesn't show anything. Any idea??


    Thanks in advance.
    Regards.

  12. #12
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: Qt Mobility Location on Nokia N97

    Hi,

    Are you doing the device testing outside? There's a large number of factors which can effect how long it takes to get a GPS fix - I've had to wait 5 or more minutes to get an initial fix previously.

    If there are any other GPS applications on the phone can you verify that they're working?

    If they are, is the timeOutLocalizacion slot being called?

    Cheers,

    Dave

  13. #13
    Registered User
    Join Date
    Apr 2010
    Posts
    17

    Re: Qt Mobility Location on Nokia N97

    Hi,

    I run Maps and my position appears correctly. I supose that this application works with GPS location... isn't it?

    I have configured one WIFI connection, and I perform my test using this connection, it's possible that the problem was there??


    Thanks.
    Best regards.

  14. #14
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: Qt Mobility Location on Nokia N97

    I'm not sure what you mean by "I perform the test using this connection". If the Maps application works quickly and indoors it may be using something else to determine your position - I'm not familiar with the app so I don't know.

    Does your example work if you run the test outside, preferably away from buildings, and ideally keeping the device fairly still for a few minutes? GPS can be pretty terrible indoors or near buildings.

    The code looks OK, and other people are doing similar things with the same device. The most likely culprits I can think of are that you're not testing the code in a place where a GPS fix is likely or that the positioning settings for your phone are set to something which the Location backend for Symbian doesn't support. If GPS is enabled it should be fine.

    Let me know how the testing goes.

    Cheers,

    Dave

  15. #15
    Registered User
    Join Date
    Apr 2010
    Posts
    17

    Re: Qt Mobility Location on Nokia N97

    Hello Dave,

    Finally, the application works! I was having a problem with my SIM. I have run the test with other SIM, and it works fine.


    Thank you very much.
    Best regards.

Posting Permissions

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