GnssStatus.Builder


public static final class GnssStatus.Builder
extends Object

java.lang.Object
   ↳ android.location.GnssStatus.Builder


Builder class to help create new GnssStatus instances.

Summary

Public constructors

Builder()

Public methods

GnssStatus.Builder addSatellite(int constellationType, int svid, float cn0DbHz, float elevation, float azimuth, boolean hasEphemeris, boolean hasAlmanac, boolean usedInFix, boolean hasCarrierFrequency, float carrierFrequency, boolean hasBasebandCn0DbHz, float basebandCn0DbHz)

Adds a new satellite to the Builder.

GnssStatus build()

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

GnssStatus.Builder clearSatellites()

Clears all satellites in the Builder.

Inherited methods

Public constructors

Builder

Added in API level 30
public Builder ()

Public methods

addSatellite

Added in API level 30
public GnssStatus.Builder addSatellite (int constellationType, 
                int svid, 
                float cn0DbHz, 
                float elevation, 
                float azimuth, 
                boolean hasEphemeris, 
                boolean hasAlmanac, 
                boolean usedInFix, 
                boolean hasCarrierFrequency, 
                float carrierFrequency, 
                boolean hasBasebandCn0DbHz, 
                float basebandCn0DbHz)

Adds a new satellite to the Builder.

Parameters
constellationType int: one of the CONSTELLATION_* constants Value is GnssStatus.CONSTELLATION_UNKNOWN, GnssStatus.CONSTELLATION_GPS, GnssStatus.CONSTELLATION_SBAS, GnssStatus.CONSTELLATION_GLONASS, GnssStatus.CONSTELLATION_QZSS, GnssStatus.CONSTELLATION_BEIDOU, GnssStatus.CONSTELLATION_GALILEO, or 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

Returns
GnssStatus.Builder This value cannot be null.

build

Added in API level 30
public GnssStatus build ()

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

Returns
GnssStatus This value cannot be null.

clearSatellites

Added in API level 30
public GnssStatus.Builder clearSatellites ()

Clears all satellites in the Builder.

Returns
GnssStatus.Builder This value cannot be null.