Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions) Summary: [Ctors](https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#inhmethods)

# RttStationRangingParams.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/ranging/wifi/rtt/RttStationRangingParams.Builder "View this page in Kotlin") \|Java


`
public
static
final

class
RttStationRangingParams.Builder
`


`

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


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.ranging.wifi.rtt.RttStationRangingParams.Builder |

<br />

*** ** * ** ***

Builder class for `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#Builder(java.lang.String)(https://developer.android.com/reference/java/lang/String bssid) ` Constructs a new `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` for creating a Wifi Station ranging session. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams` | ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#build()() ` Builds and returns a new `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams` instance. |
| ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` | ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#setChannelWidth(int)(int channelWidth) ` set channel width for this ranging session |
| ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` | ` https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder#setRangingUpdateRate(int)(int updateRate) ` Sets the update rate for the STA-AP ranging session. |

| ### 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

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public Builder (String bssid)
```

Constructs a new `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` for creating a Wifi Station ranging session.

<br />

| Parameters ||
|---|---|
| `bssid` | `String`: address of the remote AP. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `bssid` is null. |

## Public methods

### build

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public RttStationRangingParams build ()
```

Builds and returns a new `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams` instance.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams` | a new `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams` object configured with the provided parameters. This value cannot be `null`. <br /> |

### setChannelWidth

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public RttStationRangingParams.Builder setChannelWidth (int channelWidth)
```

set channel width for this ranging session

<br />

| Parameters ||
|---|---|
| `channelWidth` | `int`: . Set channel width if ranging have to be started with lower bandwidth than supported higher bandwidth. Possible values: `https://developer.android.com/` `https://developer.android.com/` `https://developer.android.com/` `https://developer.android.com/` `https://developer.android.com/` `https://developer.android.com/` Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_20MHZ` - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_40MHZ` - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_80MHZ` - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_160MHZ` - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_80MHZ_PLUS_MHZ` - `https://developer.android.com/reference/android/net/wifi/ScanResult#CHANNEL_WIDTH_320MHZ` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` | This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `channelWidth` is null. |

### setRangingUpdateRate

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public RttStationRangingParams.Builder setRangingUpdateRate (int updateRate)
```

Sets the update rate for the STA-AP ranging session.

Defaults to `https://developer.android.com/`

<br />

| Parameters ||
|---|---|
| `updateRate` | `int`: the reporting frequency. Possible values: `https://developer.android.com/` `https://developer.android.com/` `https://developer.android.com/` Value is one of the following: - `https://developer.android.com/reference/android/ranging/raw/RawRangingDevice#UPDATE_RATE_NORMAL` - `https://developer.android.com/reference/android/ranging/raw/RawRangingDevice#UPDATE_RATE_INFREQUENT` - `https://developer.android.com/reference/android/ranging/raw/RawRangingDevice#UPDATE_RATE_FREQUENT` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` | this `https://developer.android.com/reference/android/ranging/wifi/rtt/RttStationRangingParams.Builder` instance. This value cannot be `null`. <br /> |