LocationRequestCompat

Compatibility version of LocationRequest.

Types

Link copied to clipboard
class Builder
A builder class for LocationRequestCompat.
Link copied to clipboard
annotation class Quality

Properties

Link copied to clipboard
val PASSIVE_INTERVAL: Long = 9223372036854775807
Represents a passive only request.
Link copied to clipboard
A quality constant indicating a location provider may choose to satisfy this request by equally balancing power and accuracy constraints.
Link copied to clipboard
A quality constant indicating a location provider may choose to satisfy this request by providing very accurate locations at the expense of potentially increased power usage.
Link copied to clipboard
A quality constant indicating a location provider may choose to satisfy this request by providing less accurate locations in order to save power.

Functions

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
@IntRange(from = 1)
open fun getDurationMillis(): Long
Returns the duration for which location will be provided before the request is automatically removed.
Link copied to clipboard
@IntRange(from = 0)
open fun getIntervalMillis(): Long
Returns the desired interval of location updates, or PASSIVE_INTERVAL if this is a passive, no power request.
Link copied to clipboard
@IntRange(from = 0)
open fun getMaxUpdateDelayMillis(): Long
Returns the maximum time any location update may be delayed, and thus grouped with following updates to enable location batching.
Link copied to clipboard
@IntRange(from = 1, to = Integer.MAX_VALUE)
open fun getMaxUpdates(): Int
Returns the maximum number of location updates for this request before the request is automatically removed.
Link copied to clipboard
Returns the minimum distance between location updates.
Link copied to clipboard
Returns the minimum update interval.
Link copied to clipboard
open fun getQuality(): Int
Returns the quality hint for this location request.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
@RequiresApi(value = 31)
@NonNull
open fun toLocationRequest(): @NonNull LocationRequest
Converts an instance to an equivalent LocationRequest.
@Nullable
open fun toLocationRequest(@NonNull provider: @NonNull String): @Nullable LocationRequest
Converts an instance to an equivalent LocationRequest, with the provider field of the resulting LocationRequest set to the provider argument provided to this method.
Link copied to clipboard
@NonNull
open fun toString(): @NonNull String