Added in API level 31

Builder


class Builder
kotlin.Any
   ↳ android.location.GnssMeasurementRequest.Builder

Builder for GnssMeasurementRequest

Summary

Public constructors

Constructs a Builder instance.

Constructs a Builder instance by copying a GnssMeasurementRequest.

Public methods
GnssMeasurementRequest

Builds a GnssMeasurementRequest instance as specified by this builder.

GnssMeasurementRequest.Builder

Set the value of whether to enable full GNSS tracking, which is false by default.

GnssMeasurementRequest.Builder

Set the time interval between the reported measurements in milliseconds, which is 0 by default.

Public constructors

Builder

Added in API level 31
Builder()

Constructs a Builder instance.

Builder

Added in API level 31
Builder(request: GnssMeasurementRequest)

Constructs a Builder instance by copying a GnssMeasurementRequest.

Parameters
request GnssMeasurementRequest: This value cannot be null.

Public methods

build

Added in API level 31
fun build(): GnssMeasurementRequest

Builds a GnssMeasurementRequest instance as specified by this builder.

Return
GnssMeasurementRequest This value cannot be null.

setFullTracking

Added in API level 31
fun setFullTracking(value: Boolean): GnssMeasurementRequest.Builder

Set the value of whether to enable full GNSS tracking, which is false by default.

If true, GNSS chipset switches off duty cycling. In such a mode, no clock discontinuities are expected, and when supported, carrier phase should be continuous in good signal conditions. All non-blocklisted, healthy constellations, satellites and frequency bands that the chipset supports must be reported in this mode. The GNSS chipset will consume more power in full tracking mode than in duty cycling mode. If false, GNSS chipset optimizes power via duty cycling, constellations and frequency limits, etc.

Full GNSS tracking mode affects GnssMeasurement and other GNSS functionalities including GNSS location.

Full tracking requests always override non-full tracking requests. If any full tracking request occurs, all listeners on the device will receive full tracking GNSS measurements.

Return
GnssMeasurementRequest.Builder This value cannot be null.

setIntervalMillis

Added in API level 33
fun setIntervalMillis(value: Int): GnssMeasurementRequest.Builder

Set the time interval between the reported measurements in milliseconds, which is 0 by default. The request interval may be set to PASSIVE_INTERVAL which indicates this request will not actively generate GNSS measurement updates, but may receive GNSS measurement updates generated as a result of other GNSS measurement requests.

An interval of 0 milliseconds means the fastest rate the chipset can report.

The GNSS chipset may report measurements with a rate faster than requested.

Note that on Android T, a request interval of PASSIVE_INTERVAL will first trigger one GNSS measurement. Another GNSS measurement will be triggered after PASSIVE_INTERVAL milliseconds and so on.

Parameters
value Int: Value is 0 or greater
Return
GnssMeasurementRequest.Builder This value cannot be null.