Builder
class Builder
| kotlin.Any | |
| ↳ | android.net.wifi.aware.AwarePairingConfig.Builder |
Builder used to build AwarePairingConfig objects.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| AwarePairingConfig |
build()Build |
| AwarePairingConfig.Builder |
setBootstrappingMethods(methods: Int)Set the supported bootstrapping methods |
| AwarePairingConfig.Builder |
setPairingCacheEnabled(enabled: Boolean)Set whether enable cache of the NPK/NIK of Aware Pairing setup |
| AwarePairingConfig.Builder |
setPairingSetupEnabled(enabled: Boolean)Set whether enable the Aware Pairing setup |
| AwarePairingConfig.Builder |
setPairingVerificationEnabled(enabled: Boolean)Set whether enable the Aware Pairing verification |
| AwarePairingConfig.Builder |
setSupportedCipherSuites(cipherSuites: Int)Set the supported cipher suites. |
Public constructors
Public methods
build
fun build(): AwarePairingConfig
Build AwarePairingConfig given the current requests made on the builder.
| Return | |
|---|---|
AwarePairingConfig |
This value cannot be null. |
setBootstrappingMethods
fun setBootstrappingMethods(methods: Int): AwarePairingConfig.Builder
Set the supported bootstrapping methods
| Return | |
|---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods. This value cannot be null. |
setPairingCacheEnabled
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
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
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. |