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

# AwarePairingConfig.Builder

*** ** * ** ***


`
public
static
final

class
AwarePairingConfig.Builder
`


`

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


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.wifi.aware.AwarePairingConfig.Builder |

<br />

*** ** * ** ***

Builder used to build `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#build()() ` Build `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig` given the current requests made on the builder. |
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#setBootstrappingMethods(int)(int methods) ` Set the supported bootstrapping methods |
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#setPairingCacheEnabled(boolean)(boolean enabled) ` Set whether enable cache of the NPK/NIK of Aware Pairing setup |
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#setPairingSetupEnabled(boolean)(boolean enabled) ` Set whether enable the Aware Pairing setup |
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#setPairingVerificationEnabled(boolean)(boolean enabled) ` Set whether enable the Aware Pairing verification |
| ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | ` https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder#setSupportedCipherSuites(int)(int cipherSuites) ` Set the supported cipher suites. |

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

```
public Builder ()
```

<br />

<br />

## Public methods

### build

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

```
public AwarePairingConfig build ()
```

Build `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig` given the current requests made on the
builder.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig` | This value cannot be `null`. <br /> |

### setBootstrappingMethods

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

```
public AwarePairingConfig.Builder setBootstrappingMethods (int methods)
```

Set the supported bootstrapping methods

<br />

| Parameters ||
|---|---|
| `methods` | `int`: methods supported, set of PAIRING_BOOTSTRAPPING_ values. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_OPPORTUNISTIC` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_QR_DISPLAY` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_NFC_TAG` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_QR_SCAN` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_NFC_READER` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_SERVICE_MANAGED` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_SKIPPED` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | the current `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` builder, enabling chaining of builder methods. This value cannot be `null`. <br /> |

### setPairingCacheEnabled

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

```
public AwarePairingConfig.Builder setPairingCacheEnabled (boolean enabled)
```

Set whether enable cache of the NPK/NIK of Aware Pairing setup

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable caching, false otherwise <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | the current `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` builder, enabling chaining of builder methods. This value cannot be `null`. <br /> |

### setPairingSetupEnabled

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

```
public AwarePairingConfig.Builder setPairingSetupEnabled (boolean enabled)
```

Set whether enable the Aware Pairing setup

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable, false otherwise <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | the current `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` builder, enabling chaining of builder methods. This value cannot be `null`. <br /> |

### setPairingVerificationEnabled

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

```
public AwarePairingConfig.Builder setPairingVerificationEnabled (boolean enabled)
```

Set whether enable the Aware Pairing verification

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: if set to true will accept Aware Pairing verification request from peer with cached NPK/NIK, otherwise will reject the request . <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | the current `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` builder, enabling chaining of builder methods. This value cannot be `null`. <br /> |

### setSupportedCipherSuites

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

```
public AwarePairingConfig.Builder setSupportedCipherSuites (int cipherSuites)
```

Set the supported cipher suites. If not set, default will be
`https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128`

<br />

| Parameters ||
|---|---|
| `cipherSuites` | `int`: cipher suites supported. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` | the current `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder` builder, enabling chaining of builder methods. This value cannot be `null`. <br /> |