Elapsed distance when GPS signal is lost

Former Member
Former Member

I have GPS enabled for my app using Position.enableLocationEvents, so Activity.getActivityInfo().elapsedDistance uses GPS to calculate the elapsed distance. What happens if the GPS signal is lost? Will it use the pedometer to track distance until the signal is re-acquired, or will it effectively pause its tracking (and, thus, I'll want to add in a formula to try to calculate that missed distance)?

In the simulator when I turned the GPS off it kept tracking distance, but I wasn't sure if it was because it "switched" to a different data source or if that's just the nature of the simulator's valid but random data.

  • What you'll probably see is more of a dropout than a permanent loss.  Going through a tunnel for instance.  It will still use GPS, but it will be a straight line between the last good point and the current one.