WifiP2pPairingBootstrappingConfig
class WifiP2pPairingBootstrappingConfig : Parcelable
| kotlin.Any | |
| ↳ | android.net.wifi.p2p.WifiP2pPairingBootstrappingConfig |
A class representing Wi-Fi Direct pairing bootstrapping configuration.
Summary
| Constants | |
|---|---|
| static Int |
Pairing bootstrapping method display passphrase - The passphrase is displayed on the connection initiating device. |
| static Int |
Pairing bootstrapping method display pin-code - The pin-code is displayed on the connection initiating device. |
| static Int |
Pairing bootstrapping method keypad passphrase - The passphrase is displayed on the other device. |
| static Int |
Pairing bootstrapping method keypad pin-code - The pin-code is displayed on the other device. |
| static Int |
Pairing bootstrapping method opportunistic |
| static Int |
Pairing bootstrapping done out of band (For example: Over Bluetooth LE. Refer Wi-Fi Alliance Wi-Fi Direct R2 specification Section 3.9 for the details). |
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
WifiP2pPairingBootstrappingConfig(method: Int, password: String?)Constructor for a WifiP2pPairingBootstrappingConfig. |
|
| Public methods | |
|---|---|
| Int |
Implement the Parcelable interface |
| Int |
Gets the current pairing bootstrapping method. |
| String? |
Retrieves the PIN or password used for the current pairing bootstrapping method. |
| String |
toString()Generates a string of all the defined elements. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Implement the Parcelable interface |
| Properties | |
|---|---|
| static Parcelable.Creator<WifiP2pPairingBootstrappingConfig!> |
Implement the Parcelable interface |
Constants
PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PASSPHRASE
static val PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PASSPHRASE: Int
Pairing bootstrapping method display passphrase - The passphrase is displayed on the connection initiating device. The user enters the displayed passphrase on the other device.
Value: 4PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PINCODE
static val PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PINCODE: Int
Pairing bootstrapping method display pin-code - The pin-code is displayed on the connection initiating device. The user enters the displayed pin-code on the other device.
Value: 2PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PASSPHRASE
static val PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PASSPHRASE: Int
Pairing bootstrapping method keypad passphrase - The passphrase is displayed on the other device. The user enters the displayed passphrase on the connection initiating device.
Value: 16PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PINCODE
static val PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PINCODE: Int
Pairing bootstrapping method keypad pin-code - The pin-code is displayed on the other device. The user enters the displayed pin-code on the connection initiating device.
Value: 8PAIRING_BOOTSTRAPPING_METHOD_OPPORTUNISTIC
static val PAIRING_BOOTSTRAPPING_METHOD_OPPORTUNISTIC: Int
Pairing bootstrapping method opportunistic
Value: 1PAIRING_BOOTSTRAPPING_METHOD_OUT_OF_BAND
static val PAIRING_BOOTSTRAPPING_METHOD_OUT_OF_BAND: Int
Pairing bootstrapping done out of band (For example: Over Bluetooth LE. Refer Wi-Fi Alliance Wi-Fi Direct R2 specification Section 3.9 for the details).
Value: 32Public constructors
WifiP2pPairingBootstrappingConfig
WifiP2pPairingBootstrappingConfig(
method: Int,
password: String?)
Constructor for a WifiP2pPairingBootstrappingConfig.
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if a non-null password is set for pairing bootstrapping method PAIRING_BOOTSTRAPPING_METHOD_OPPORTUNISTIC, PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PINCODE or PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PASSPHRASE. |
Public methods
describeContents
fun describeContents(): Int
Implement the Parcelable interface
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getPairingBootstrappingMethod
fun getPairingBootstrappingMethod(): Int
Gets the current pairing bootstrapping method.
getPairingBootstrappingPassword
fun getPairingBootstrappingPassword(): String?
Retrieves the PIN or password used for the current pairing bootstrapping method.
The specific type and format of the returned value depend on the active pairing bootstrapping method:
If the method is PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PINCODE or PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PINCODE, this method returns a PIN. A PIN is a string consisting of 4 or more digits (0-9).
If the method is PAIRING_BOOTSTRAPPING_METHOD_DISPLAY_PASSPHRASE or PAIRING_BOOTSTRAPPING_METHOD_KEYPAD_PASSPHRASE this method returns a password. A password is a UTF-8 encoded string with a minimum length of 1 character.
| Return | |
|---|---|
String? |
The PIN or password as a String, or null if not applicable for the current pairing bootstrapping method. |
toString
fun toString(): String
Generates a string of all the defined elements.
| Return | |
|---|---|
String |
a compiled string representing all elements |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Implement the Parcelable interface
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<WifiP2pPairingBootstrappingConfig!>
Implement the Parcelable interface