AwarePairingConfig.Builder
public
static
final
class
AwarePairingConfig.Builder
extends Object
java.lang.Object | |
↳ | android.net.wifi.aware.AwarePairingConfig.Builder |
Builder used to build AwarePairingConfig
objects.
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
AwarePairingConfig
|
build()
Build |
AwarePairingConfig.Builder
|
setBootstrappingMethods(int methods)
Set the supported bootstrapping methods |
AwarePairingConfig.Builder
|
setPairingCacheEnabled(boolean enabled)
Set whether enable cache of the NPK/NIK of Aware Pairing setup |
AwarePairingConfig.Builder
|
setPairingSetupEnabled(boolean enabled)
Set whether enable the Aware Pairing setup |
AwarePairingConfig.Builder
|
setPairingVerificationEnabled(boolean enabled)
Set whether enable the Aware Pairing verification |
AwarePairingConfig.Builder
|
setSupportedCipherSuites(int cipherSuites)
Set the supported cipher suites. |
Inherited methods | |
---|---|
Public constructors
Public methods
build
public AwarePairingConfig build ()
Build AwarePairingConfig
given the current requests made on the
builder.
Returns | |
---|---|
AwarePairingConfig |
This value cannot be null . |
setBootstrappingMethods
public AwarePairingConfig.Builder setBootstrappingMethods (int methods)
Set the supported bootstrapping methods
Parameters | |
---|---|
methods |
int : methods supported, set of PAIRING_BOOTSTRAPPING_ values
Value is either 0 or a combination of AwarePairingConfig.PAIRING_BOOTSTRAPPING_OPPORTUNISTIC , AwarePairingConfig.PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY , AwarePairingConfig.PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY , AwarePairingConfig.PAIRING_BOOTSTRAPPING_QR_DISPLAY , AwarePairingConfig.PAIRING_BOOTSTRAPPING_NFC_TAG , AwarePairingConfig.PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD , AwarePairingConfig.PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD , AwarePairingConfig.PAIRING_BOOTSTRAPPING_QR_SCAN , and AwarePairingConfig.PAIRING_BOOTSTRAPPING_NFC_READER |
Returns | |
---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods.
This value cannot be null . |
setPairingCacheEnabled
public AwarePairingConfig.Builder setPairingCacheEnabled (boolean enabled)
Set whether enable cache of the NPK/NIK of Aware Pairing setup
Parameters | |
---|---|
enabled |
boolean : true to enable caching, false otherwise |
Returns | |
---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods.
This value cannot be null . |
setPairingSetupEnabled
public AwarePairingConfig.Builder setPairingSetupEnabled (boolean enabled)
Set whether enable the Aware Pairing setup
Parameters | |
---|---|
enabled |
boolean : true to enable, false otherwise |
Returns | |
---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods.
This value cannot be null . |
setPairingVerificationEnabled
public AwarePairingConfig.Builder setPairingVerificationEnabled (boolean enabled)
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 . |
Returns | |
---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods.
This value cannot be null . |
setSupportedCipherSuites
public AwarePairingConfig.Builder setSupportedCipherSuites (int cipherSuites)
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 Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128 , and Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256 |
Returns | |
---|---|
AwarePairingConfig.Builder |
the current Builder builder, enabling chaining of builder methods.
This value cannot be null . |