I have a code that successfully receives location updates from several providers and filters them to give the current best estimate.
I have added code to check the returned values โโof Location.hasSpeed โโ() and .hasBearing () to do some calculations related to the bearing when the user is actually moving.
Everything works fine on Huawei Sonic 2.3.3, but on Google Nexus S running 4.0.4, the location of the GPS provider always returns false for .hasSpeed โโ() and 0 for .getSpeed โโ().
When I register my location receiver, the GPS provider returns true for .supportsSpeed โโ(), but it never returns the speed in the location, even if the accuracy is up to 30 m and is physically moving (in the car, on the dashboard for maximum reception, the screen is on )
Is there a difference between 2.3.x and ICS 4.x? Do I need to perform my own speed calculation, even if the reporting service supports it?
source
share