Qt World Summit: Submit your Presentation

Qt Positioning

  • Hi,

    I have successfully made an android c++ application that logs gps coordinates & timestamp to an sqlite file every second, however it seems like it misses data for 8-10 seconds randomly ( every 2-3 minutes). BUT if I debug application with usb cable connected it does not miss anything????, I have disabled power saving on phone with no luck.

    any ideas ?

    (I´m using Qt 5.3)


  • Qt Champions 2017

    welcome to forum. Difficult to predict what is happening here since you are telling that USB debug is fine. I suggest you start logging those data and see the time duration. I suspect some logic issue here.

  • Update.

    I have made some "debugging".... if I change my HTC One Mini setting "Screen timeout" to 1 hour and start application I do not get any 10 second "drop" of updating only a 1 second now and then,if the screen timeout and get black there are 10 second drops again... As I can see the positionUpdated() slot does not get called when these "timeouts" occur. -- how do I get my application to get "highest priority" ? it seems like my HTC does something when screen goes black.
    If I do not get any 10 second timeouts my GPS map looks very accurate.


  • Qt Champions 2017

    This may be the optimisation done by Android OS. Generally these are mobile device centric features. When the screen is off, fair assumption is that some things need not run when the device is in kind of "no use" mode. Let me check and revert back to you on this feature.

  • Update 2.

    I am pretty sure this is an "android problem" , when I charge the phone with HTC provided charger and run my application I do not get any 10 second "drops" even if screen is dark...
    I hope there is some simple solution for this otherwise it is not possible to get accurate GPS data.


  • Is there anyone that has some idea what I can try to do ?


Log in to reply