Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#nestedclasses) \| [Constants](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#constants) \| [Inherited Constants](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#inhconstants) \| [Fields](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#lfields) \| [Methods](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#inhmethods)

# OobInitiatorRangingConfig

*** ** * ** ***

` public final class OobInitiatorRangingConfig `   
` ` ` extends https://developer.android.com/reference/android/ranging/RangingConfig ` ` implements https://developer.android.com/reference/android/os/Parcelable `

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

<br />

*** ** * ** ***

Represents the configuration for an Out-of-Band (OOB) initiator in a ranging session. This class includes configuration options such as device handles, security level, ranging mode, and interval range for setting up an OOB initiator ranging session.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder` Builder class for creating instances of `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig`. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_AUTO` Automatic ranging mode. |
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_FUSED` Starts ranging with all the ranging technologies both devices support. |
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY` *This constant was deprecated in API level 37. This mode is deprecated, use `https://developer.android.com/` and optionally with `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setRangingTechnologyFilter(java.util.Set<java.lang.Integer>)` if apps want to restrict ranging technology usage.* |
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY_PREFERRED` High accuracy ranging mode. |
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_BASIC` Basic security level for the ranging session. |
| `int` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_SECURE` Basic security level for the ranging session. |

### Inherited constants

From class `https://developer.android.com/reference/android/ranging/RangingConfig` `int` `https://developer.android.com/reference/android/ranging/RangingConfig#RANGING_SESSION_OOB`

Ranging session with the out-of-band negotiations performed by the ranging API.
`int` `https://developer.android.com/reference/android/ranging/RangingConfig#RANGING_SESSION_RAW`

Ranging session with the out-of-band negotiations performed by the app.
From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig>` | `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#CREATOR` <br /> |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/ranging/oob/DeviceHandle>` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getDeviceHandles()() ` Returns the list of DeviceHandles associated with the OOB initiator. |
| ` https://developer.android.com/reference/java/time/Duration` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getFastestRangingInterval()() ` Returns the fastest requested ranging interval. |
| ` https://developer.android.com/reference/android/util/Range<https://developer.android.com/reference/java/time/Duration>` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getRangingIntervalRange()() ` Returns the ranging interval range configuration. |
| ` int` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getRangingMode()() ` Returns the ranging mode for the session. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/Integer>` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getRangingTechnologyFilter()() ` Returns the set of ranging technologies that can be used for the session. |
| ` int` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getSecurityLevel()() ` Returns the security level set for the ranging session. |
| ` https://developer.android.com/reference/java/time/Duration` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#getSlowestRangingInterval()() ` Returns the slowest acceptable ranging. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class ` https://developer.android.com/reference/android/ranging/RangingConfig ` ` int` ` https://developer.android.com/reference/android/ranging/RangingConfig#getRangingSessionType()() `

Gets the ranging session type `https://developer.android.com/`
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/ranging/RangingConfig#toString()() `

Returns a string representation of the object.
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*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Constants

### RANGING_MODE_AUTO

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

```
public static final int RANGING_MODE_AUTO
```

Automatic ranging mode. Allows the system to choose the best mode.

<br />

Constant Value: 0 (0x00000000)

### RANGING_MODE_FUSED

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

```
public static final int RANGING_MODE_FUSED
```

Starts ranging with all the ranging technologies both devices support.

<br />

Constant Value: 3 (0x00000003)

### RANGING_MODE_HIGH_ACCURACY

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

```
public static final int RANGING_MODE_HIGH_ACCURACY
```

<br />

**This constant was deprecated in API level 37.**   

This mode is deprecated, use `https://developer.android.com/` and optionally with `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig.Builder#setRangingTechnologyFilter(java.util.Set<java.lang.Integer>)` if apps want to restrict ranging technology usage.

<br />

<br />

Constant Value: 1 (0x00000001)

### RANGING_MODE_HIGH_ACCURACY_PREFERRED

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

```
public static final int RANGING_MODE_HIGH_ACCURACY_PREFERRED
```

High accuracy ranging mode. Fallback to lower accuracy if high accuracy ranging is not supported by all devices.

<br />

Constant Value: 2 (0x00000002)

### SECURITY_LEVEL_BASIC

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

```
public static final int SECURITY_LEVEL_BASIC
```

Basic security level for the ranging session.

Example usage: UWB: Static-STS BLE-CS: Security level one

<br />

Constant Value: 0 (0x00000000)

### SECURITY_LEVEL_SECURE

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

```
public static final int SECURITY_LEVEL_SECURE
```

Basic security level for the ranging session.

Example usage: UWB: Provisioned-STS BLE-CS: Security level four

<br />

Constant Value: 1 (0x00000001)

## Fields

### CREATOR

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

```
public static final Creator<OobInitiatorRangingConfig> CREATOR
```

<br />

<br />

## Public methods

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getDeviceHandles

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

```
public List<DeviceHandle> getDeviceHandles ()
```

Returns the list of DeviceHandles associated with the OOB initiator.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/ranging/oob/DeviceHandle>` | A list of DeviceHandle objects. This value cannot be `null`. <br /> |

### getFastestRangingInterval

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

```
public Duration getFastestRangingInterval ()
```

Returns the fastest requested ranging interval.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/Duration` | The fastest interval. This value cannot be `null`. <br /> |

### getRangingIntervalRange

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

```
public Range<Duration> getRangingIntervalRange ()
```

Returns the ranging interval range configuration.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/util/Range<https://developer.android.com/reference/java/time/Duration>` | The `https://developer.android.com/reference/android/util/Range` associated with this OOB initiator. This value cannot be `null`. <br /> |

### getRangingMode

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

```
public int getRangingMode ()
```

Returns the ranging mode for the session.

<br />

| Returns ||
|---|---|
| `int` | the ranging mode. Possible values: `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` 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` |

### getRangingTechnologyFilter

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

```
public Set<Integer> getRangingTechnologyFilter ()
```

Returns the set of ranging technologies that can be used for the session. If empty, the system may use any available technology.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/Integer>` | A non-null, possibly empty, `https://developer.android.com/reference/java/util/Set` of Ranging Technology integers. <br /> |

### getSecurityLevel

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

```
public int getSecurityLevel ()
```

Returns the security level set for the ranging session.

<br />

| Returns ||
|---|---|
| `int` | the security level. Possible values: `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_BASIC` `https://developer.android.com/reference/android/ranging/oob/OobInitiatorRangingConfig#SECURITY_LEVEL_SECURE` 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` |

### getSlowestRangingInterval

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

```
public Duration getSlowestRangingInterval ()
```

Returns the slowest acceptable ranging.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/Duration` | The slowest interval. This value cannot be `null`. <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |