Mapbox Android location puck update interval

83 Views Asked by At

I am using MapBox map SDK (newest release version) to show the user's location on a map. I am following the following example: https://docs.mapbox.com/android/maps/guides/user-location/

How ever the location is updating very rapidly, and I am concerned about battery usage.

How can I easily reduce the interval of the GPS position updates? an update of 1 to 2 seconds interval is more than enough.

I have searched the documentation but am not sure how to do it without creating a new LocationProvider and implementing the UI updates of the puck manually.

1

There are 1 best solutions below

0
On

You can use Mapbox Navigation SDK, this SDK include map with some extra features like Drop in UI and eHorizon.

In their doc you can set custom location engine or modify in built location preferences as per your need.

Check this doc : https://docs.mapbox.com/android/navigation/guides/device-location