Added in API level 30

Builder


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

Builder class to help create new GnssStatus instances.

Summary

Public constructors

Public methods
GnssStatus.Builder
addSatellite(constellationType: Int, svid: Int, cn0DbHz: Float, elevation: Float, azimuth: Float, hasEphemeris: Boolean, hasAlmanac: Boolean, usedInFix: Boolean, hasCarrierFrequency: Boolean, carrierFrequency: Float, hasBasebandCn0DbHz: Boolean, basebandCn0DbHz: Float)

Adds a new satellite to the Builder.

GnssStatus

Builds a new GnssStatus based on the satellite information in the Builder.

GnssStatus.Builder

Clears all satellites in the Builder.

Public constructors

Builder

Added in API level 30
Builder()

Public methods

addSatellite

Added in API level 30
fun addSatellite(
    constellationType: Int,
    svid: Int,
    cn0DbHz: Float,
    elevation: Float,
    azimuth: Float,
    hasEphemeris: Boolean,
    hasAlmanac: Boolean,
    usedInFix: Boolean,
    hasCarrierFrequency: Boolean,
    carrierFrequency: Float,
    hasBasebandCn0DbHz: Boolean,
    basebandCn0DbHz: Float
): GnssStatus.Builder

Adds a new satellite to the Builder.

Parameters
constellationType Int: one of the CONSTELLATION_* constants Value is android.location.GnssStatus#CONSTELLATION_UNKNOWN, android.location.GnssStatus#CONSTELLATION_GPS, android.location.GnssStatus#CONSTELLATION_SBAS, android.location.GnssStatus#CONSTELLATION_GLONASS, android.location.GnssStatus#CONSTELLATION_QZSS, android.location.GnssStatus#CONSTELLATION_BEIDOU, android.location.GnssStatus#CONSTELLATION_GALILEO, or android.location.GnssStatus#CONSTELLATION_IRNSS
svid Int: the space vehicle identifier Value is between 1 and 200 inclusive
cn0DbHz Float: carrier-to-noise density at the antenna in dB-Hz Value is between 0 and 63 inclusive
elevation Float: satellite elevation in degrees Value is between -90 and 90 inclusive
azimuth Float: satellite azimuth in degrees Value is between 0 and 360 inclusive
hasEphemeris Boolean: whether the satellite has ephemeris data
hasAlmanac Boolean: whether the satellite has almanac data
usedInFix Boolean: whether the satellite was used in the most recent location fix
hasCarrierFrequency Boolean: whether carrier frequency data is available
carrierFrequency Float: satellite carrier frequency in Hz Value is 0 or greater
hasBasebandCn0DbHz Boolean: whether baseband carrier-to-noise density is available
basebandCn0DbHz Float: baseband carrier-to-noise density in dB-Hz Value is between 0 and 63 inclusive
Return
GnssStatus.Builder This value cannot be null.

build

Added in API level 30
fun build(): GnssStatus

Builds a new GnssStatus based on the satellite information in the Builder.

Return
GnssStatus This value cannot be null.

clearSatellites

Added in API level 30
fun clearSatellites(): GnssStatus.Builder

Clears all satellites in the Builder.

Return
GnssStatus.Builder This value cannot be null.