locationUpdateInterval property

int? locationUpdateInterval
getter/setter pair

[Android only] Set the desired interval for active location updates, in milliseconds.

Note: To use locationUpdateInterval you must also configure distanceFilter:0, since distanceFilter overrides locationUpdateInterval.

Set the desired interval for active location updates, in milliseconds.

The location client will actively try to obtain location updates for your application at this interval, so it has a direct influence on the amount of power used by your application. Choose your interval wisely.

This interval is inexact. You may not receive updates at all (if no location sources are available), or you may receive them slower than requested. You may also receive them faster than requested (if other applications are requesting location at a faster interval).

Applications with only the coarse location permission may have their interval silently throttled.\

Note: For more information, see the Android docs

Example

BackgroundGeolocation.ready(Config(
  distanceFilter: 0,            // Must be 0 or locationUpdateInterval is ignored!
  locationUpdateInterval: 5000  // Get a location every 5 seconds
));

Implementation

int? locationUpdateInterval;