CurrentLocationRequest

public final class CurrentLocationRequest extends Object
implements Parcelable

An encapsulation of various parameters for requesting the current location through FusedLocationProviderClient.

Nested Class Summary

class CurrentLocationRequest.Builder A builder for CurrentLocationRequest

Inherited Constant Summary

Public Method Summary

boolean
equals(Object object)
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
String
void
writeToParcel(Parcel parcel, int flags)

Inherited Method Summary

Public Methods

public boolean equals (Object object)

public 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. 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.

public int getGranularity ()

The Granularity of locations returned for this request. This controls whether fine or coarse locations may be returned.

public long getMaxUpdateAgeMillis ()

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.

public int getPriority ()

The Priority of the location request used to derive the current location if no historical location satisfies the current location request.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel parcel, int flags)