Priority
Location power vs accuracy priority levels to be used with APIs within FusedLocationProviderClient
.
Priority values have been intentionally chosen to match the framework QUALITY constants,
and the values are specified such that higher priorities should always have lower values and
vice versa.
Constant Summary
int |
PRIORITY_BALANCED_POWER_ACCURACY
|
Requests a tradeoff that is balanced between
location accuracy and power usage. |
int |
PRIORITY_HIGH_ACCURACY
|
Requests a tradeoff that favors highly accurate
locations at the possible expense of additional power usage. |
int |
PRIORITY_LOW_POWER
|
Requests a tradeoff that favors low power usage
at the possible expense of location accuracy. |
int |
PRIORITY_PASSIVE
|
Ensures that no extra power will be used to
derive locations. |
Inherited Method Summary
From interface java.lang.annotation.Annotation
abstract Class<? extends Annotation>
|
annotationType()
|
abstract boolean |
|
abstract int |
hashCode()
|
abstract String
|
toString()
|
Constants
public static final int
PRIORITY_BALANCED_POWER_ACCURACY
Requests a tradeoff that is balanced between location accuracy and power usage.
Constant Value: 102
public static final int
PRIORITY_HIGH_ACCURACY
Requests a tradeoff that favors highly accurate locations at the possible expense of
additional power usage.
Constant Value: 100
public static final int
PRIORITY_LOW_POWER
Requests a tradeoff that favors low power usage at the possible expense of location
accuracy.
Constant Value: 104
public static final int
PRIORITY_PASSIVE
Ensures that no extra power will be used to derive locations. This enforces that the
request will act as a passive listener that will only receive "free" locations
calculated on behalf of other clients, and no locations will be calculated on behalf of
only this request.
Constant Value: 105
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["`Priority` defines location power vs accuracy priority levels for use with the `FusedLocationProviderClient` API."],["Higher priority values indicate lower accuracy and lower power consumption, and vice versa."],["Four priority levels are available: `PRIORITY_HIGH_ACCURACY`, `PRIORITY_BALANCED_POWER_ACCURACY`, `PRIORITY_LOW_POWER`, and `PRIORITY_PASSIVE`."],["`PRIORITY_PASSIVE` ensures no extra power is used for location updates, relying solely on locations calculated for other clients."]]],["The `Priority` interface defines location power versus accuracy levels for use with `FusedLocationProviderClient`. It establishes four priority constants: `PRIORITY_HIGH_ACCURACY` (100) for high accuracy at the expense of power, `PRIORITY_BALANCED_POWER_ACCURACY` (102) for a balance between the two, `PRIORITY_LOW_POWER` (104) for low power usage over accuracy, and `PRIORITY_PASSIVE` (105) for no additional power usage, receiving only \"free\" location updates. Lower values indicate higher priority.\n"]]