Saturday, January 1, 2011

[android-developers] LocationManager speed

I have a KML file that I feed to the emulator through the DDMS
emulator control. The latitude and longitude values come through just
fine, but the thing never has any speed (doing a
LocationManager.hasSpeed() is always false as is getSpeed() always
0.0).

Is there some sort of trick you have to use to get the emulator to
recognize speed?

Note that I added a method to calculate the speed based on the math
involved between the last lat/long coordinate and the current one
along with the change in time in between the two readings, but I
THOUGHT this wouldn't need to be done and that I should be able to
rely on LocationManager.hasSpeed and getSpeed in the real world.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate