LastLocationRequest Stay organized with collections Save and categorize content based on your preferences.
Page Summary
LastLocationRequest encapsulates parameters for requesting a cached last location through FusedLocationProviderClient.
It includes methods to get the granularity and the maximum age of locations returned for the request.
LastLocationRequest implements the Parcelable interface.
A builder class, LastLocationRequest.Builder, is available for creating LastLocationRequest instances.
An encapsulation of various parameters for requesting a (cached) last location throughFusedLocationProviderClient.
Nested Class Summary
| class | LastLocationRequest.Builder | A builder forLastLocationRequest. | |
Inherited Constant Summary
| int | CONTENTS_FILE_DESCRIPTOR | |
| int | PARCELABLE_WRITE_RETURN_VALUE |
Field Summary
| public static finalCreator<LastLocationRequest> | CREATOR |
Public Method Summary
| boolean | |
| int | getGranularity() The Granularity of locations returned for this request. |
| long | getMaxUpdateAgeMillis() The maximum age of any location returned for this request. |
| int | hashCode() |
| String | toString() |
| void | writeToParcel(Parcel parcel, int flags) |
Inherited Method Summary
| abstract int | describeContents() |
| abstract void | writeToParcel(Parcel arg0, int arg1) |
Fields
public static finalCreator<LastLocationRequest>CREATOR
Public Methods
public booleanequals(Object object)
public intgetGranularity()
TheGranularity of locations returned for this request. This controls whether fine or coarse locations may be returned.
public longgetMaxUpdateAgeMillis()
The maximum age of any location returned for this request. A value ofLong.MAX_VALUE represents an effectively unbounded maximum age.
public inthashCode()
publicStringtoString()
public voidwriteToParcel(Parcel parcel, int flags)
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.