getting the highest GPS update rate from the GPS Hardware in my Android

拜拜、爱过 提交于 2019-12-03 11:27:10

Currently you can't get updates faster than once per second in most of the phone.This is the hardware gps limit.

Usually in most of the phones,it is at 1hz.

It all depends on hardware and scenario where you are using ( Indoor,Outdoor)

But again, You could check using

LocationRequest setFastestInterval (long millis)

This allows your application to passively acquire locations at a rate faster than it actively acquires locations, saving power.

Unlike setInterval(long), this parameter is exact. Your application will never receive updates faster than this value.

This method sets the fastest rate in milliseconds at which your app can handle location updates. You need to set this rate because other apps also affect the rate at which updates are sent. Location Services sends out updates at the fastest rate that any app requested by calling LocationRequest.setInterval().

If this rate is faster than your app can handle, you may encounter problems with UI flicker or data overflow.

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