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

后端 未结 1 470
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-14 04:39

I got to program Android from other platforms I used with GPS . on the other platfroms I had access to the GPS HW (I had a low level GPS driver) and by that I could get GPS upda

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-14 05:34

    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.

    0 讨论(0)
提交回复
热议问题