# GnssAutomaticGainControl.Builder

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

# Builder

*** ** * ** ***

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

```
class Builder
```

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

Builder for[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl)

## Summary

|                                                                                                                                                                                                                                                                                      Public constructors                                                                                                                                                                                                                                                                                       ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#Builder())`()` Constructs a[GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#)instance.                                                                                                                                                                                                                                                                                                        |
| [Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#Builder(android.location.GnssAutomaticGainControl))`(`agc:` `[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl)`)` Constructs a[GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#)instance by copying a[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl). |

|                                                                                                                                                                                                                Public methods                                                                                                                                                                                                                 ||
|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl)                  | [build](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#build())`()` Builds a[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl)instance as specified by this builder.               |
| [GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#) | [setCarrierFrequencyHz](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#setCarrierFrequencyHz(kotlin.Long))`(`carrierFrequencyHz:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the Carrier frequency in Hz. |
| [GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#) | [setConstellationType](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#setConstellationType(kotlin.Int))`(`constellationType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the constellation type.            |
| [GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#) | [setLevelDb](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#setLevelDb(kotlin.Double))`(`levelDb:` `[Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)`)` Sets the Automatic Gain Control level in dB.                 |

## Public constructors

### Builder

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

```
Builder()
```

Constructs a[GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#)instance.  

### Builder

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

```
Builder(agc: GnssAutomaticGainControl)
```

Constructs a[GnssAutomaticGainControl.Builder](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl.Builder#)instance by copying a[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl).

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

## Public methods

### build

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

```
fun build(): GnssAutomaticGainControl
```

Builds a[GnssAutomaticGainControl](https://developer.android.com/reference/kotlin/android/location/GnssAutomaticGainControl)instance as specified by this builder.

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

### setCarrierFrequencyHz

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

```
fun setCarrierFrequencyHz(carrierFrequencyHz: Long): GnssAutomaticGainControl.Builder
```

Sets the Carrier frequency in Hz.

|                                                        Parameters                                                        ||
|----------------------|----------------------------------------------------------------------------------------------------|
| `carrierFrequencyHz` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html):Value is 0 or greater |

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

### setConstellationType

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

```
fun setConstellationType(constellationType: Int): GnssAutomaticGainControl.Builder
```

Sets the constellation type.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `constellationType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):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) |

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

### setLevelDb

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

```
fun setLevelDb(levelDb: Double): GnssAutomaticGainControl.Builder
```

Sets the Automatic Gain Control level in dB.

|                                                                  Parameters                                                                   ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------|
| `levelDb` | [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html):Value is between -10000.0f and 10000.0f inclusive |

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