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

# OobInitiatorRangingConfig.Builder

*** ** * ** ***

` public static final class OobInitiatorRangingConfig.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<br />

*** ** * ** ***

Builder class for creating instances of `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#addDeviceHandle(android.ranging.oob.DeviceHandle)(https://developer.android.com/reference/android/ranging/oob/DeviceHandle deviceHandle) ` Adds a DeviceHandle to the list of devices for the ranging session. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#addDeviceHandles(java.util.List<android.ranging.oob.DeviceHandle>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/ranging/oob/DeviceHandle> deviceHandles) ` Adds a list of DeviceHandle to the list of devices for the ranging session. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#build()() ` Builds an instance of `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig` with the provided parameters. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setFastestRangingInterval(java.time.Duration)(https://developer.android.com/reference/java/time/Duration intervalMs) ` Sets the fastest ranging interval in milliseconds. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setRangingMode(int)(int rangingMode) ` Sets the ranging mode for the session. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setRangingTechnologyFilter(java.util.Set<java.lang.Integer>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/Integer> rangingTechnologies) ` Sets a filter for the ranging technologies that can be used for the session. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setSecurityLevel(int)(int securityLevel) ` Sets the security level for the ranging session. |
| ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setSlowestRangingInterval(java.time.Duration)(https://developer.android.com/reference/java/time/Duration intervalMs) ` Sets the slowest ranging interval in milliseconds. |

### 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 [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

<br />

<br />

## Public methods

### addDeviceHandle

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

```
public OobInitiatorRangingConfig.Builder addDeviceHandle (DeviceHandle deviceHandle)
```

Adds a DeviceHandle to the list of devices for the ranging session.

<br />

| Parameters ||
|---|---|
| `deviceHandle` | `DeviceHandle`: The DeviceHandle to add. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance. This value cannot be `null`. <br /> |

### addDeviceHandles

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

```
public OobInitiatorRangingConfig.Builder addDeviceHandles (List<DeviceHandle> deviceHandles)
```

Adds a list of DeviceHandle to the list of devices for the ranging session.

<br />

| Parameters ||
|---|---|
| `deviceHandles` | `List`: The list of DeviceHandles to add. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance. This value cannot be `null`. <br /> |

### build

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

```
public OobInitiatorRangingConfig build ()
```

Builds an instance of `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig` with the provided parameters.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig` | A new OobInitiatorRangingConfig instance. This value cannot be `null`. <br /> |

### setFastestRangingInterval

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

```
public OobInitiatorRangingConfig.Builder setFastestRangingInterval (Duration intervalMs)
```

Sets the fastest ranging interval in milliseconds.

<br />

| Parameters ||
|---|---|
| `intervalMs` | `Duration`: The fastest interval in milliseconds. Defaults to 100ms. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance, for chaining calls. This value cannot be `null`. <br /> |

### setRangingMode

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

```
public OobInitiatorRangingConfig.Builder setRangingMode (int rangingMode)
```

Sets the ranging mode for the session.

<br />

| Parameters ||
|---|---|
| `rangingMode` | `int`: The ranging mode to set. Defaults to `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_AUTO` Value is one of the following: - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_AUTO` - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY` - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY_PREFERRED` - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_FUSED` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance. This value cannot be `null`. <br /> |

### setRangingTechnologyFilter

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

```
public OobInitiatorRangingConfig.Builder setRangingTechnologyFilter (Set<Integer> rangingTechnologies)
```

Sets a filter for the ranging technologies that can be used for the session.

If this set is empty (the default), the system will attempt to use any available and suitable ranging technology. If the set is non-empty, the system will restrict its choice of technology to those specified in this set.

<br />

<br />

| Parameters ||
|---|---|
| `rangingTechnologies` | `Set`: A `https://developer.android.com/reference/java/util/Set` of Ranging Technology integers. Must not be null. To indicate no preference (allow any technology), pass an empty set. <br /> |

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

### setSecurityLevel

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

```
public OobInitiatorRangingConfig.Builder setSecurityLevel (int securityLevel)
```

Sets the security level for the ranging session.

<br />

| Parameters ||
|---|---|
| `securityLevel` | `int`: The security level to set. Defaults to `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_BASIC` Value is one of the following: - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_BASIC` - `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_SECURE` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance. This value cannot be `null`. <br /> |

### setSlowestRangingInterval

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

```
public OobInitiatorRangingConfig.Builder setSlowestRangingInterval (Duration intervalMs)
```

Sets the slowest ranging interval in milliseconds.

<br />

| Parameters ||
|---|---|
| `intervalMs` | `Duration`: The slowest interval in milliseconds. Defaults to 5000ms. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` | The Builder instance, for chaining calls. This value cannot be `null`. <br /> |