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

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

Posted by: admin May 14, 2020 Leave a comment


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 updates 5 times per second and even more
Now I work with Samsung Galaxy S2 (which it is clear to me that its GPS is very strong and can supply several updates per second
Currently when I set the GPS provider to supply updates in minimum distance and minimum time like this:

    LocationManager.GPS_PROVIDER, 0, 0, mlocListener

I get 1 update per second (or 800ms as smallest gap between two updates) which is too low for my application. Is there a way to force the GPS HW to report more updates somehow ? I guess it is not exposed to the user but is there still some way to access the registers of the GPS HW somehow ?

How to&Answers:

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.