LocationAccuracy (API Reference)
Enum Class LocationAccuracy
- All Implemented Interfaces:
Serializable,Comparable<LocationAccuracy>,Constable
Indicates the desired location accuracy, however the actual accuracy is not guaranteed. When requesting high-accuracy locations, the initial update delivered by the LocationEngine may not have the requested accuracy. Requesting higher accuracy location updates usually means higher power consumption, therefore you should use the lowest accuracy suitable for your use case to preserve the device battery.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe best accuracy available, using all possible sources: satellite, WiFi and Cell positioning.Accurate to within hundreds of meters of the desired target.Accurate to within kilometers of the desired target.The default accuracy when navigation is needed, using satellite and WiFi positioning.Decimeter accurate navigation using satellite and WiFi positioning.Accurate to within tens of meters of the desired target. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationAccuracyReturns the enum constant of this class with the specified name.static LocationAccuracy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BEST_AVAILABLE
The best accuracy available, using all possible sources: satellite, WiFi and Cell positioning. Additional sensor data may be used for improving positioning accuracy. Update frequency may vary between 1 second to about 30 seconds, so this is not the best option for navigation purposes, see
NAVIGATIONandSUB_METER_NAVIGATION. -
SUB_METER_NAVIGATION
Decimeter accurate navigation using satellite and WiFi positioning. Additional sensor data may be used for improving positioning accuracy. Update frequency is as close to once per second as possible. This feature requires Android 12 or later and dual frequency GNSS receiver and raw GNSS measurements. This feature is disabled by default: Contact us to enable it. If it is not enabled or the OS/device requirements are not met, fallback to other positioning technologies may occur and desired accuracy level may not be reached.
-
NAVIGATION
The default accuracy when navigation is needed, using satellite and WiFi positioning. Additional sensor data is used for improving navigation accuracy. Update frequency is as close to once per second as possible.
-
TENS_OF_METERS
Accurate to within tens of meters of the desired target. Additional sensor data may be used for improving localization accuracy.
-
HUNDREDS_OF_METERS
Accurate to within hundreds of meters of the desired target.
-
KILOMETERS
Accurate to within kilometers of the desired target.
-
-
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
-