An encapsulation of various parameters for requesting the current location through
FusedLocationProviderClient.
| class | CurrentLocationRequest.Builder | A builder for CurrentLocationRequest. |
|
| boolean | |
| long |
getDurationMillis()
The duration in milliseconds of the location request used to derive the current
location if no historical location satisfies the current location request.
|
| int |
getGranularity()
The
Granularity
of locations returned for this request.
|
| long |
getMaxUpdateAgeMillis()
The maximum age of any location returned for this request.
|
| int |
getPriority()
The
Priority
of the location request used to derive the current location if no historical
location satisfies the current location request.
|
| int |
hashCode()
|
| String |
toString()
|
| void |
writeToParcel(Parcel parcel, int
flags)
|
The duration in milliseconds of the location request used to derive the current location if no historical location satisfies the current location request. If this duration expires with no location, the current location request will return a null location. The current location request may fail and return a null location after a shorter duration (ie, the given duration may be capped internally), but never a longer duration.
The Granularity
of locations returned for this request. This controls whether fine or coarse locations
may be returned.
The maximum age of any location returned for this request. A value of 0 indicates
that only freshly derived locations will be returned, and no historical locations will
ever be returned. A value Long.MAX_VALUE
represents an effectively unbounded maximum age.
NOTE: This parameter applies only to historical locations. Freshly derived locations should almost always have timestamps close to the present time - however it is possible under unlikely conditions for location derivation to take longer than expected, in which case freshly derived locations may have slightly older timestamps.
The Priority
of the location request used to derive the current location if no historical location
satisfies the current location request.