Friday, May 25, 2012

MySpeed 3.0.1 - request location updates less often

A new release of MySpeed, mainly related to Android version 2.2 compatibility.

Request location updates less often.
It was requesting location updates as often as possible, which worked fine on my old G1 because it only received updates once every second, but my Nexus One is sending them several times a second which is causing the performance to plummet. I've now set it to 1 second and 10 meters.
It wasn't immediately clear how the two parameters to requestLocationUpdates interact with each other. Does it mean if time > t AND distance > d then send an update, or does it mean OR? Turns out it means check every t seconds, and if distance is more than d send an update. Makes sense because that's the easiest to implement.

Another Android 2.2 fix that was causing the same location to be logged multiple times:
2.2 has a new passive location provider, which means if you're sending a location update for someone else then send me one as well. Which means if you request GPS and passive, you get the same update twice.

I also did a fix the About menu for screen density. Again, related to Android 2.x.