Enum Class LocationRequest.RealtimeUpdateInterval

java.lang.Object
java.lang.Enum<LocationRequest.RealtimeUpdateInterval>
es.situm.sdk.location.LocationRequest.RealtimeUpdateInterval
All Implemented Interfaces:
Serializable, Comparable<LocationRequest.RealtimeUpdateInterval>, Constable
Enclosing class:
LocationRequest

public static enum LocationRequest.RealtimeUpdateInterval extends Enum<LocationRequest.RealtimeUpdateInterval>
Determines how often the SDK attempts to upload buffered location updates to Situm Platform.

The interval is expressed in milliseconds. The available values are the constants in this enum; the resolved default is LocationRequest.DEFAULT_REALTIME_UPDATE_INTERVAL.

This value does not change how often locations are computed or delivered through LocationListener.onLocationChanged(Location). It controls when locations already stored locally for realtime are uploaded. Longer intervals allow multiple locations to be sent in one request, reducing network overhead at the cost of a less current location in the Dashboard Realtime Panel.

Locations awaiting upload are stored locally. If an upload cannot be completed, the SDK retries it when a later upload attempt succeeds.

Related properties.

  • Enum Constant Details

  • Method Details

    • values

      public static LocationRequest.RealtimeUpdateInterval[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LocationRequest.RealtimeUpdateInterval valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getInterval

      public int getInterval()
      Gets the interval in milliseconds between upload attempts.

      A value of 0 represents NEVER.

      Returns:
      value in milliseconds