Builder
class Builder
kotlin.Any | |
↳ | android.location.GnssMeasurementRequest.Builder |
Builder for GnssMeasurementRequest
Summary
Public constructors | |
---|---|
Builder() Constructs a |
|
Builder(request: GnssMeasurementRequest) Constructs a |
Public methods | |
---|---|
GnssMeasurementRequest |
build() Builds a |
GnssMeasurementRequest.Builder |
setFullTracking(value: Boolean) Set the value of whether to enable full GNSS tracking, which is false by default. |
GnssMeasurementRequest.Builder |
setIntervalMillis(value: Int) Set the time interval between the reported measurements in milliseconds, which is 0 by default. |
Public constructors
Builder
Builder(request: GnssMeasurementRequest)
Constructs a Builder
instance by copying a GnssMeasurementRequest
.
Parameters | |
---|---|
request |
GnssMeasurementRequest: This value cannot be null . |
Public methods
build
fun build(): GnssMeasurementRequest
Builds a GnssMeasurementRequest
instance as specified by this builder.
Return | |
---|---|
GnssMeasurementRequest |
This value cannot be null . |
setFullTracking
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
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 . |