Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for GnssMeasurementRequest
Summary
Public constructors
Builder
Builder()
Constructs a Builder
instance.
Public methods
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.
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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GnssMeasurementRequest.Builder\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/location/GnssMeasurementRequest.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.location.GnssMeasurementRequest.Builder](#) |\n\nBuilder for [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest)\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder())`()` Constructs a [Builder](#) instance. |\n| [Builder](#Builder(android.location.GnssMeasurementRequest))`(`request:` `[GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest)`)` Constructs a [Builder](#) instance by copying a [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest). |\n\n| Public methods ||\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest) | [build](#build())`()` Builds a [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest) instance as specified by this builder. |\n| [GnssMeasurementRequest.Builder](#) | [setFullTracking](#setFullTracking(kotlin.Boolean))`(`value:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Set the value of whether to enable full GNSS tracking, which is false by default. |\n| [GnssMeasurementRequest.Builder](#) | [setIntervalMillis](#setIntervalMillis(kotlin.Int))`(`value:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the time interval between the reported measurements in milliseconds, which is 0 by default. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder()\n```\n\nConstructs a [Builder](#) instance. \n\n### Builder\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(request: GnssMeasurementRequest)\n```\n\nConstructs a [Builder](#) instance by copying a [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest).\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------------------------|\n| `request` | [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest): This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): GnssMeasurementRequest\n```\n\nBuilds a [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest) instance as specified by this builder.\n\n| Return ||\n|-------------------------------------------------------------------------------------|------------------------------|\n| [GnssMeasurementRequest](/reference/kotlin/android/location/GnssMeasurementRequest) | This value cannot be `null`. |\n\n### setFullTracking\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setFullTracking(value: Boolean): GnssMeasurementRequest.Builder\n```\n\nSet the value of whether to enable full GNSS tracking, which is false by default.\n\nIf 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.\n\nFull GNSS tracking mode affects GnssMeasurement and other GNSS functionalities including GNSS location.\n\nFull 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.\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [GnssMeasurementRequest.Builder](#) | This value cannot be `null`. |\n\n### setIntervalMillis\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setIntervalMillis(value: Int): GnssMeasurementRequest.Builder\n```\n\nSet the time interval between the reported measurements in milliseconds, which is 0 by default. The request interval may be set to [PASSIVE_INTERVAL](/reference/kotlin/android/location/GnssMeasurementRequest#PASSIVE_INTERVAL:kotlin.Int) 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.\n\nAn interval of 0 milliseconds means the fastest rate the chipset can report.\n\nThe GNSS chipset may report measurements with a rate faster than requested.\n\nNote that on Android T, a request interval of [PASSIVE_INTERVAL](/reference/kotlin/android/location/GnssMeasurementRequest#PASSIVE_INTERVAL:kotlin.Int) will first trigger one GNSS measurement. Another GNSS measurement will be triggered after [PASSIVE_INTERVAL](/reference/kotlin/android/location/GnssMeasurementRequest#PASSIVE_INTERVAL:kotlin.Int) milliseconds and so on.\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------|\n| `value` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is 0 or greater |\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [GnssMeasurementRequest.Builder](#) | This value cannot be `null`. |"]]