# GnssStatus.Builder

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/location/GnssStatus.Builder "View this page in Java")  

```
class Builder
```

|---|----------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                             ||
| ↳ | [android.location.GnssStatus.Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#) |

Builder class to help create new GnssStatus instances.

## Summary

|                                                  Public constructors                                                  ||
|--------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#Builder())`()` <br /> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ||
|-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GnssStatus.Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#) | [addSatellite](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#addSatellite(kotlin.Int,%20kotlin.Int,%20kotlin.Float,%20kotlin.Float,%20kotlin.Float,%20kotlin.Boolean,%20kotlin.Boolean,%20kotlin.Boolean,%20kotlin.Boolean,%20kotlin.Float,%20kotlin.Boolean,%20kotlin.Float))`(`constellationType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `svid:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `cn0DbHz:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `elevation:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `azimuth:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `hasEphemeris:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `hasAlmanac:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `usedInFix:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `hasCarrierFrequency:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `carrierFrequency:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `hasBasebandCn0DbHz:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `basebandCn0DbHz:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` Adds a new satellite to the Builder. |
| [GnssStatus](https://developer.android.com/reference/kotlin/android/location/GnssStatus)                  | [build](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#build())`()` Builds a new GnssStatus based on the satellite information in the Builder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [GnssStatus.Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#) | [clearSatellites](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#clearSatellites())`()` Clears all satellites in the Builder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

## Public constructors

### Builder

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
Builder()
```

## Public methods

### addSatellite

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):one of the CONSTELLATION_\* constants Value is[android.location.GnssStatus#CONSTELLATION_UNKNOWN](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_UNKNOWN:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_GPS](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_GPS:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_SBAS](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_SBAS:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_GLONASS](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_GLONASS:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_QZSS](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_QZSS:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_BEIDOU](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_BEIDOU:kotlin.Int),[android.location.GnssStatus#CONSTELLATION_GALILEO](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_GALILEO:kotlin.Int), or[android.location.GnssStatus#CONSTELLATION_IRNSS](https://developer.android.com/reference/kotlin/android/location/GnssStatus#CONSTELLATION_IRNSS:kotlin.Int) |
| `svid`                | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the space vehicle identifier Value is between 1 and 200 inclusive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `cn0DbHz`             | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):carrier-to-noise density at the antenna in dB-Hz Value is between 0.0f and 63.0f inclusive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `elevation`           | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):satellite elevation in degrees Value is between -90.0f and 90.0f inclusive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `azimuth`             | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):satellite azimuth in degrees Value is between 0.0f and 360.0f inclusive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `hasEphemeris`        | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):whether the satellite has ephemeris data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `hasAlmanac`          | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):whether the satellite has almanac data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `usedInFix`           | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):whether the satellite was used in the most recent location fix                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `hasCarrierFrequency` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):whether carrier frequency data is available                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `carrierFrequency`    | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):satellite carrier frequency in Hz Value is 0.0f or greater                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `hasBasebandCn0DbHz`  | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):whether baseband carrier-to-noise density is available                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `basebandCn0DbHz`     | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):baseband carrier-to-noise density in dB-Hz Value is between 0.0f and 63.0f inclusive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

|                                                                 Return                                                                 ||
|-----------------------------------------------------------------------------------------------------------|-----------------------------|
| [GnssStatus.Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#) | This value cannot be`null`. |

### build

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun build(): GnssStatus
```

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

|                                                        Return                                                         ||
|------------------------------------------------------------------------------------------|-----------------------------|
| [GnssStatus](https://developer.android.com/reference/kotlin/android/location/GnssStatus) | This value cannot be`null`. |

### clearSatellites

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun clearSatellites(): GnssStatus.Builder
```

Clears all satellites in the Builder.

|                                                                 Return                                                                 ||
|-----------------------------------------------------------------------------------------------------------|-----------------------------|
| [GnssStatus.Builder](https://developer.android.com/reference/kotlin/android/location/GnssStatus.Builder#) | This value cannot be`null`. |