Package es.situm.sdk.location
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.
LocationRequest.Builder.interval(int)controls delivery of Indoor Positions to the application, not realtime upload cadence.OutdoorLocationOptions.Builder.computeInterval(int)controls outdoor provider acquisition cycles.OutdoorLocationOptions.Builder.updateInterval(int)controls the cadence at which Outdoor Positions are delivered to the application.LocationRequest.Builder.realtimePersistenceInterval(int)controls how often locations are stored locally for later upload.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAttempts an upload approximately every 30 minutes.Attempts an upload approximately every five seconds.Disables realtime storage and uploads for the positioning session.Attempts an upload approximately every 15 seconds.Attempts an upload approximately every second.Attempts an upload approximately every 25 seconds. -
Method Summary
Modifier and TypeMethodDescriptionintGets the interval in milliseconds between upload attempts.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
REALTIME
Attempts an upload approximately every second. -
FAST
Attempts an upload approximately every five seconds. -
NORMAL
Attempts an upload approximately every 15 seconds. -
SLOW
Attempts an upload approximately every 25 seconds. -
BATTERY_SAVER
Attempts an upload approximately every 30 minutes. The first upload attempt occurs after five seconds so a newly started session is not delayed for the full interval. -
NEVER
Disables realtime storage and uploads for the positioning session.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getInterval
public int getInterval()Gets the interval in milliseconds between upload attempts.A value of
0representsNEVER.- Returns:
- value in milliseconds
-