Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.net.wifi.aware.AwarePairingConfig.Builder

Builder used to build AwarePairingConfig objects.

Summary

Public constructors

Public methods
AwarePairingConfig

Build AwarePairingConfig given the current requests made on the builder.

AwarePairingConfig.Builder

Set the supported bootstrapping methods

AwarePairingConfig.Builder

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

AwarePairingConfig.Builder

Set whether enable the Aware Pairing setup

AwarePairingConfig.Builder

Set whether enable the Aware Pairing verification

AwarePairingConfig.Builder

Set the supported cipher suites.

Public constructors

Builder

Added in API level 34
Builder()

Public methods

build

Added in API level 34
fun build(): AwarePairingConfig

Build AwarePairingConfig given the current requests made on the builder.

Return
AwarePairingConfig This value cannot be null.

setPairingCacheEnabled

Added in API level 34
fun setPairingCacheEnabled(enabled: Boolean): AwarePairingConfig.Builder

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

Parameters
enabled Boolean: true to enable caching, false otherwise
Return
AwarePairingConfig.Builder the current Builder builder, enabling chaining of builder methods. This value cannot be null.

setPairingSetupEnabled

Added in API level 34
fun setPairingSetupEnabled(enabled: Boolean): AwarePairingConfig.Builder

Set whether enable the Aware Pairing setup

Parameters
enabled Boolean: true to enable, false otherwise
Return
AwarePairingConfig.Builder the current Builder builder, enabling chaining of builder methods. This value cannot be null.

setPairingVerificationEnabled

Added in API level 34
fun setPairingVerificationEnabled(enabled: Boolean): AwarePairingConfig.Builder

Set whether enable the Aware Pairing verification

Parameters
enabled Boolean: if set to true will accept Aware Pairing verification request from peer with cached NPK/NIK, otherwise will reject the request .
Return
AwarePairingConfig.Builder the current Builder builder, enabling chaining of builder methods. This value cannot be null.

setSupportedCipherSuites

fun setSupportedCipherSuites(cipherSuites: Int): AwarePairingConfig.Builder

Set the supported cipher suites. If not set, default will be Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128

Parameters
cipherSuites Int: cipher suites supported Value is either 0 or a combination of android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128, and android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256
Return
AwarePairingConfig.Builder the current Builder builder, enabling chaining of builder methods. This value cannot be null.