# SignalThresholdInfo.Builder

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

# Builder

*** ** * ** ***

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

```
class Builder
```

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

Builder class to create[SignalThresholdInfo](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo)objects.

## Summary

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

|                                                                                                                                                                                                                                   Public methods                                                                                                                                                                                                                                    ||
|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SignalThresholdInfo](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo)                  | [build](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#build())`()` Build[SignalThresholdInfo](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo)object.                                                                                                             |
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | [setHysteresisDb](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#setHysteresisDb(kotlin.Int))`(`hysteresisDb:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the interval in dB defining the required minimum magnitude change to report a signal strength change. |
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | [setRadioAccessNetworkType](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#setRadioAccessNetworkType(kotlin.Int))`(`ran:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the radio access network type for the builder instance.                                    |
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | [setSignalMeasurementType](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#setSignalMeasurementType(kotlin.Int))`(`signalMeasurementType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Set the signal measurement type for the builder instance.                      |
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | [setThresholds](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#setThresholds(kotlin.IntArray))`(`thresholds:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)`)` Set the signal strength thresholds of the corresponding signal measurement type.                |

## Public constructors

### Builder

```
Builder()
```

## Public methods

### build

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

```
fun build(): SignalThresholdInfo
```

Build[SignalThresholdInfo](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo)object.

|                                                                                      Return                                                                                       ||
|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| [SignalThresholdInfo](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo) | the SignalThresholdInfo object build out This value cannot be`null`. |

|                                                                                           Exceptions                                                                                            ||
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java.lang.IllegalArgumentException` | if the signal measurement type is invalid, any value in the thresholds is out of range, or the RAN is not allowed to set with the signal measurement type |

### setHysteresisDb

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

```
fun setHysteresisDb(hysteresisDb: Int): SignalThresholdInfo.Builder
```

Set the interval in dB defining the required minimum magnitude change to report a signal strength change. A value of zero disables dB-based hysteresis restrictions. Note:

Default hysteresis db value is 2. Minimum hysteresis db value allowed to set is 0. If hysteresis db value is not set, default hysteresis db value of 2 will be used.

|                                                             Parameters                                                              ||
|----------------|---------------------------------------------------------------------------------------------------------------------|
| `hysteresisDb` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the interval in dB Value is 0 or greater |

|                                                                                              Return                                                                                              ||
|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | the builder to facilitate the chaining This value cannot be`null`. |

### setRadioAccessNetworkType

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

```
fun setRadioAccessNetworkType(ran: Int): SignalThresholdInfo.Builder
```

Set the radio access network type for the builder instance.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `ran` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The radio access network type Value is[android.telephony.AccessNetworkConstants.AccessNetworkType#UNKNOWN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#UNKNOWN:kotlin.Int),[android.telephony.AccessNetworkConstants.AccessNetworkType#GERAN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#GERAN:kotlin.Int),[android.telephony.AccessNetworkConstants.AccessNetworkType#UTRAN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#UTRAN:kotlin.Int),[android.telephony.AccessNetworkConstants.AccessNetworkType#EUTRAN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#EUTRAN:kotlin.Int),[android.telephony.AccessNetworkConstants.AccessNetworkType#CDMA2000](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#CDMA2000:kotlin.Int),[android.telephony.AccessNetworkConstants.AccessNetworkType#IWLAN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#IWLAN:kotlin.Int), or[android.telephony.AccessNetworkConstants.AccessNetworkType#NGRAN](https://developer.android.com/reference/kotlin/android/telephony/AccessNetworkConstants.AccessNetworkType#NGRAN:kotlin.Int) |

|                                                                                              Return                                                                                              ||
|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | the builder to facilitate the chaining This value cannot be`null`. |

### setSignalMeasurementType

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

```
fun setSignalMeasurementType(signalMeasurementType: Int): SignalThresholdInfo.Builder
```

Set the signal measurement type for the builder instance.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ||
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `signalMeasurementType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The signal measurement type Value is[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_UNKNOWN](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_UNKNOWN:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSI](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSI:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSCP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSCP:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRP:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRQ](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRQ:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSNR](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSNR:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRP:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRQ](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRQ:kotlin.Int),[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSSINR](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSSINR:kotlin.Int), or[android.telephony.SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_ECNO](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_ECNO:kotlin.Int) |

|                                                                                              Return                                                                                              ||
|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | the builder to facilitate the chaining This value cannot be`null`. |

### setThresholds

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

```
fun setThresholds(thresholds: IntArray): SignalThresholdInfo.Builder
```

Set the signal strength thresholds of the corresponding signal measurement type. The range and unit must reference specific SignalMeasurementType. The length of the thresholds should between the numbers return from[getMinimumNumberOfThresholdsAllowed()](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#getMinimumNumberOfThresholdsAllowed())and[getMaximumNumberOfThresholdsAllowed()](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#getMaximumNumberOfThresholdsAllowed()). An IllegalArgumentException will throw otherwise.

|                                                                                   Parameters                                                                                    ||
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `thresholds` | [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html):array of integer as the signal threshold values This value cannot be`null`. |

|                                                                                              Return                                                                                              ||
|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [SignalThresholdInfo.Builder](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo.Builder#) | the builder to facilitate the chaining This value cannot be`null`. |

**See Also**

- [#SIGNAL_MEASUREMENT_TYPE_RSSI](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSI:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_RSCP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSCP:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_RSRP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRP:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_RSRQ](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRQ:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_RSSNR](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSNR:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_SSRSRP](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRP:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_SSRSRQ](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRQ:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_SSSINR](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSSINR:kotlin.Int)
- [#SIGNAL_MEASUREMENT_TYPE_ECNO](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_ECNO:kotlin.Int)
- [#getThresholds()](https://developer.android.com/reference/kotlin/android/telephony/SignalThresholdInfo#getThresholds())