Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder#inhmethods)

# SignalThresholdInfo.Builder

*** ** * ** ***


`
public
static
final

class
SignalThresholdInfo.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.SignalThresholdInfo.Builder |

<br />

*** ** * ** ***

Builder class to create `https://developer.android.com/reference/android/telephony/SignalThresholdInfo` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder#Builder()() ` |

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

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### Builder

```
public Builder ()
```

<br />

<br />

## Public methods

### build

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

```
public SignalThresholdInfo build ()
```

Build `https://developer.android.com/reference/android/telephony/SignalThresholdInfo` object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalThresholdInfo` | the SignalThresholdInfo object build out. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/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#ApiLevels)

```
public SignalThresholdInfo.Builder setHysteresisDb (int hysteresisDb)
```

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.

<br />

| Parameters ||
|---|---|
| `hysteresisDb` | `int`: the interval in dB. Value is 0 or greater <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder` | the builder to facilitate the chaining. This value cannot be `null`. <br /> |

### setRadioAccessNetworkType

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

```
public SignalThresholdInfo.Builder setRadioAccessNetworkType (int ran)
```

Set the radio access network type for the builder instance.

<br />

| Parameters ||
|---|---|
| `ran` | `int`: The radio access network type. Value is one of the following: - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#UNKNOWN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#GERAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#UTRAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#EUTRAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#CDMA2000` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#IWLAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#NGRAN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder` | the builder to facilitate the chaining. This value cannot be `null`. <br /> |

### setSignalMeasurementType

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

```
public SignalThresholdInfo.Builder setSignalMeasurementType (int signalMeasurementType)
```

Set the signal measurement type for the builder instance.

<br />

| Parameters ||
|---|---|
| `signalMeasurementType` | `int`: The signal measurement type. Value is one of the following: - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSI` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSCP` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRP` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSRQ` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_RSSNR` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRP` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSRSRQ` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_SSSINR` - `https://developer.android.com/reference/android/telephony/SignalThresholdInfo#SIGNAL_MEASUREMENT_TYPE_ECNO` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder` | the builder to facilitate the chaining. This value cannot be `null`. <br /> |

### setThresholds

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

```
public SignalThresholdInfo.Builder setThresholds (int[] thresholds)
```

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
`https://developer.android.com/reference/android/telephony/SignalThresholdInfo#getMinimumNumberOfThresholdsAllowed()` and
`https://developer.android.com/reference/android/telephony/SignalThresholdInfo#getMaximumNumberOfThresholdsAllowed()`. An IllegalArgumentException will throw
otherwise.

<br />

| Parameters ||
|---|---|
| `thresholds` | `int`: array of integer as the signal threshold values. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalThresholdInfo.Builder` | the builder to facilitate the chaining. This value cannot be `null`. <br /> |

**See also:**

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