LocationRequest in Google Play Services isn't updating for interval set as less than 1 second.

大兔子大兔子 提交于 2019-12-04 15:32:19

Currently you can't get updates faster than once per second. This is the hardware gps limit. Network location is a bit slower (used when indoors) - currently about once every 5 seconds. Raw accelerometer data comes in at a higher frequency, but tends to be very noisy when integrated directly. This may improve in the future, but probably not at the high frequency you're looking for.

I am trying to change with below parameter and its working for me with whatever I set.

locationRequest.setFastestInterval(10000); // Every 10 sec it gives lat/lng

Please try with in your side with same change.

I think a problem is that you set PRIORITY_HIGH_ACCURACY. High_accuracy = GPS provider

Gps chipsets in phone usually have only ~1Hz update rate.

Maybe it can work if you disable HighAccuracy.

The fact is there is a hardware delay that you can't ignore. Try to pass a float to your interval. Kill zombies after each update may help too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!