Find out the speed of the User in android Using GPS
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to find out the speed of User, while user is moving with device. Here, I followed one link with sample code. i.e: Here SpeedDemo. The problem is, by using location.getSpeed() method, we are finding the speed. So, for that I changed the location values in device, but every time the value of the location.getspeed() return '0' only. Why it happen, even changing the location itself. Can any one known about this? 回答1: You have to track location Updates, and when the method onLocationChanged(Location location) triggers, you can call