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

# Builder

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig.Builder "View this page in Java")

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.net.wifi.aware.AwarePairingConfig.Builder](https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig.Builder#) |

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

## Summary

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

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

## Public constructors

### Builder

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

```
Builder()
```

## Public methods

### build

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

```
fun build(): AwarePairingConfig
```

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

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig` | This value cannot be `null`. |

### setBootstrappingMethods

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

```
fun setBootstrappingMethods(methods: Int): AwarePairingConfig.Builder
```

Set the supported bootstrapping methods

| Parameters ||
|---|---|
| `methods` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): methods supported, set of PAIRING_BOOTSTRAPPING_ values. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_OPPORTUNISTIC:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_QR_DISPLAY:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_NFC_TAG:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_QR_SCAN:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_NFC_READER:kotlin.Int` |

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

### setPairingCacheEnabled

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

```
fun setPairingCacheEnabled(enabled: Boolean): AwarePairingConfig.Builder
```

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

| Parameters ||
|---|---|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): true to enable caching, false otherwise |

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

### setPairingSetupEnabled

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

```
fun setPairingSetupEnabled(enabled: Boolean): AwarePairingConfig.Builder
```

Set whether enable the Aware Pairing setup

| Parameters ||
|---|---|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): true to enable, false otherwise |

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

### setPairingVerificationEnabled

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

```
fun setPairingVerificationEnabled(enabled: Boolean): AwarePairingConfig.Builder
```

Set whether enable the Aware Pairing verification

| Parameters ||
|---|---|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): if set to true will accept Aware Pairing verification request from peer with cached NPK/NIK, otherwise will reject the request . |

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

### setSupportedCipherSuites

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

```
fun setSupportedCipherSuites(cipherSuites: Int): AwarePairingConfig.Builder
```

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

| Parameters ||
|---|---|
| `cipherSuites` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): cipher suites supported. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256:kotlin.Int` |

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