Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Registered User catharsis's Avatar
    Join Date
    Jul 2008
    Posts
    103
    If you have an application with maps (take mapsdemo, for example), when you initialize maps widget you have this message:
    Code:
    [Qt Message] ******************************************************************************** 
    [Qt Message] Qt Location requires usage of app_id and token parameters obtained from: 
    [Qt Message] https://api.forum.nokia.com/ovi-api/ui/registration 
    [Qt Message] For more information about app_id and token please consult: 
    [Qt Message] http://doc.qt.nokia.com/qtmobility-latest/location-overview.html#the-nokia-plugin 
    [Qt Message] ********************************************************************************
    I went to https://api.developer.nokia.com/ovi-...on?action=list and got an App Id, but I still get the message when I run my application and in some cases my app crashes because of the map.

    I init the service provider like this:
    Code:
    QMap<QString, QVariant> params;
        params.insert("mapping.app_id", MY_APP_ID);
        params.insert("routing.app_id", MY_APP_ID);
        params.insert("places.app_id", MY_APP_ID);
        params.insert("mapping.token", MY_APP_TOKEN);
        params.insert("routing.token", MY_APP_TOKEN);
        params.insert("places.token", MY_APP_TOKEN);
    
        foreach (QString provider, providers) {
            serviceProvider = new QGeoServiceProvider(provider, params);
            if (serviceProvider->mappingManager() &&
                    serviceProvider->searchManager() &&
                    serviceProvider->routingManager())
                break;
        }
    I'm running this on a phone with QtMobility 1.2.1 and I still get the same message. Is there something I missed or something I'm doing wrong?

    PS: My app token is something like SOME_LETTERS_AND_NUMBERS_7kA%3D%3D. Could there be some errors in its generations, since %3D is url encoding for "=" ?
    Also there is a "Secret" string provided in registration, where do I use it?

  2. #2
    Registered User habersaa's Avatar
    Join Date
    Oct 2011
    Posts
    7
    Hello,

    There was a bug in the logic to display this message, I reported it on the Bug Tracker (https://bugreports.qt.nokia.com/browse/QTMOBILITY-1922) some weeks ago and I think it has been fixed recently (last week), maybe you can find the new code in the master branch of the Gitorious repository (https://qt.gitorious.org/qt-mobility).

    Concerning the crashes, I also experience a lot of crashes when using QGeoMapCustomObjects, I had to fix 3-4 things in the code but it still crashes when I draw circles on custom objects with MeterUnits for very obscure reasons (some assert in QPainterPath)...

    Best regards,
    Alexandre H.

  3. #3
    Hi Habersaa

    Are you sure that this bug is been fixed already? Because I meet the same problem when I apply the almost same code. both the app_id and token are got when I registered my program for Map API used

    QMap<QString, QVariant> params;
    params.insert("mapping.app_id", "FLVrBWgh_7Zi_NifYost");
    params.insert("routing.app_id", "FLVrBWgh_7Zi_NifYost");
    params.insert("places.app_id", "FLVrBWgh_7Zi_NifYost");
    params.insert("mapping.token", "eP9raM74ACwAvGjnKzbGwA%3D%3D");
    params.insert("routing.token", "eP9raM74ACwAvGjnKzbGwA%3D%3D");
    params.insert("places.token", "eP9raM74ACwAvGjnKzbGwA%3D%3D");

    QList<QString> providers = QGeoServiceProvider::availableServiceProviders();
    QGeoServiceProvider *serviceProvider;

    foreach (QString provider, providers){
    serviceProvider = new QGeoServiceProvider(provider,params);
    if (serviceProvider->mappingManager() &&
    serviceProvider->searchManager() &&
    serviceProvider->routingManager())
    {

    break;
    //w.initialize(serviceProvider->mappingManager());
    }

    }

  4. #4
    Registered User catharsis's Avatar
    Join Date
    Jul 2008
    Posts
    103
    In my application it used to crash because I initialized map widget in constructor of the MainWindow. The error made the constructor crash and be recalled until it crashed the application.

    Funny thing is that if I use token and app id, map routing does not work, I get "Forbidden" error from routing server. So I commented all the code regarding parameters and I get the Location API error once and then it works.

  5. #5
    Registered User Jaya The Cat's Avatar
    Join Date
    Jul 2012
    Posts
    1
    What I have posted before was wrong, so I had to edit it
    Last edited by Jaya The Cat; 2012-07-15 at 15:33. Reason: My post was wrong

Similar Threads

  1. Why registering for S60 3rd Edition FP2 SDK v1.1?
    By DaveMaha in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2010-02-06, 18:56
  2. Problem registering S60 3rd ed. fp2 SDK
    By Kurppa_digia in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2009-01-01, 10:26
  3. registering my app
    By jselvakumar26071988 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-10-04, 18:34
  4. Help with registering program
    By telstar43 in forum General Development Questions
    Replies: 1
    Last Post: 2007-11-21, 07:26
  5. -5 error registering MTM
    By dave_tracey in forum Symbian C++
    Replies: 0
    Last Post: 2003-12-12, 11:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved