LastLocationRequest

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

public final classLastLocationRequest extendsObject
implementsParcelable

An encapsulation of various parameters for requesting a (cached) last location throughFusedLocationProviderClient.

Nested Class Summary

class LastLocationRequest.BuilderA builder forLastLocationRequest

Inherited Constant Summary

From interface android.os.Parcelable
intCONTENTS_FILE_DESCRIPTOR
intPARCELABLE_WRITE_RETURN_VALUE

Field Summary

public static finalCreator<LastLocationRequest> CREATOR

Public Method Summary

boolean
equals(Object object)
int
getGranularity()
TheGranularity of locations returned for this request.
long
getMaxUpdateAgeMillis()
The maximum age of any location returned for this request.
int
String
void
writeToParcel(Parcel parcel, int flags)

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
From interface android.os.Parcelable
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.