Coder Social home page Coder Social logo

Comments (1)

barbeau avatar barbeau commented on August 16, 2024

After testing GpsStatus.getTimeToFirstFix() with GPS Benchmark running in the background, it seems there is still an issue with TTFF not being calculated properly by the GPS engine when there are multiple activities with LocationListeners registered. However, since we no longer use the MyLocationOverlay, there isn't the "counting" effect within GPSTest anymore. Therefore, we can stick with the official GpsStatus.getTimeToFirstFix() and see if we can get the multiple activities issues resolved with the Android platform team.

Quote from my original write-up on mikeandroid#3:

TTFF for the GpsStatus.getTimeToFirstFix() in the underlying GPS engine seems to be calculated by:

TTFF =  the most recent GpsStatus.GPS_EVENT_FIRST_FIX time - start time of this activity monitoring GPS

Since the GpsStatus.GPS_EVENT_FIRST_FIX is triggered by another activity (in this case the GpsMapActivity continuously registering the MyLocationOverlay on each GPS fix), the resulting behavior is the TTFF continuously climbing by 1 sec every second.

It seems that the underlying problem is a bug in how the GPS engine reports TTFF when multiple Activities are interacting with the engine. It seems that TTFF should be reported independently for each Activity, with the TTFF being reported as 0 for an Activity B that starts listening to GPS updates when another Activity A is already listening to GPS updates (i.e., the two apps are listening to GPS concurrently). And, Activity A TTFF should never change based on another Activities actions of listening to GPS, if Activity A was the Activity that triggered the original GPS engine startup.

from gpstest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.