获得使用谷歌的速度播放位置API速度、位置、API

2023-09-06 09:26:43 作者:我是壹棵狗尾巴草

我使用从新GOOGLEPLAY API(LocationClient类)融合的位置提供。但该方法Location.GetSpeed​​()没有返回正确的速度(显示为0)。我读到我必须使用的LocationManager类获取的速度,但是当我尝试的LocationManager一个新的问题发生。位置管理NetworkProvider不工作,这里是这个问题的 HTTP://$c$c.google.com/p/android/issues/detail ID = 57707 ?因此,什么是获取运动的速度的最佳方式。我试图计算它的距离/时间,但它是不准确的。

I am using fused location provider from the new GooglePlay API(LocationClient class). But the method Location.GetSpeed() is not returning correct speed (shows 0). I read that I have to use LocationManager class to get the speed, but when I tried LocationManager a new problem occured. The location manager NetworkProvider is not working, here is a thread with the problem http://code.google.com/p/android/issues/detail?id=57707 . So what is the best way to get the speed of movement. I tried calculating it distance/time but it is not accurate..

推荐答案

我也遇到过,当我使用谷歌播放位置API这个问题,我希望这可以帮助。

I also encountered this problem when I was using Google Play Location API, I hope this can help.

它返回0,因为设备无法获得的GPS锁定,或者不能连接到GPS。

It returns 0 because your device cannot get a lock on the GPS, or cannot connect to the GPS.

我试图用一个旧的联想设备以获取速度,因为它不能在GPS锁定它返回0。

I tried to get the speed using an older lenovo device and it returns 0 because it cannot lock on a gps.

我试图用一个三星GALAXY Nexus,它返回我的速度(有一个更好的GPS传感器)。

I tried using a samsung galaxy nexus and it returned my speed(has a better GPS sensor).

在手机中的GPS传感器可能不是很好,或者您是在具有GPS信号弱,如房屋或建筑物内的一个区域。

The GPS sensor in your phone might not be good or you are in an area that has a weak GPS signal such as inside a house or building.

即使你使用的LocationManager获得速度,如果你没有连接到GPS,你的getSpeed​​仍然会返回0。

Even if you use the locationManager to get the speed if you are not connected to the gps, your getSpeed will still return 0.