WifiP2pConfig
open class WifiP2pConfig : Parcelable
kotlin.Any | |
↳ | android.net.wifi.p2p.WifiP2pConfig |
A class representing a Wi-Fi P2p configuration for setting up a connection {@see WifiP2pManager}
Summary
Nested classes | |
---|---|
Builder used to build |
Constants | |
---|---|
static Int |
IP provisioning via IPv4 DHCP, when joining a group as a group client. |
static Int |
IP provisioning via IPv6 link-local, when joining a group as a group client. |
static Int |
Allow the system to pick the operating frequency from the 2. |
static Int |
Allow the system to pick the operating frequency from the 5 GHz band. |
static Int |
Allow the system to pick the operating frequency from all supported bands. |
static Int |
The system can choose an appropriate owner intent value, to be filled in the field |
static Int |
The most inclination to be a group owner, to be filled in the field |
static Int |
The least inclination to be a group owner, to be filled in the field |
Inherited constants | |
---|---|
Public constructors | |
---|---|
WifiP2pConfig(source: WifiP2pConfig!) copy constructor |
Public methods | |
---|---|
open Int |
Implement the Parcelable interface |
open Int |
Get the IP provisioning mode when joining a group as a group client. |
open Int |
Get the required band for the group owner. |
open Int |
Get the network ID of this P2P configuration. |
open String? |
Get the network name of this P2P configuration, or null if unset. |
open String? |
Get the passphrase of this P2P configuration, or null if unset. |
open String |
toString() |
open Unit |
writeToParcel(dest: Parcel, flags: Int) Implement the Parcelable interface |
Properties | |
---|---|
static Parcelable.Creator<WifiP2pConfig!> |
Implement the Parcelable interface |
String! |
The device MAC address uniquely identifies a Wi-Fi p2p device |
Int |
This is an integer value between |
WpsInfo! |
Wi-Fi Protected Setup information |
Constants
GROUP_CLIENT_IP_PROVISIONING_MODE_IPV4_DHCP
static val GROUP_CLIENT_IP_PROVISIONING_MODE_IPV4_DHCP: Int
IP provisioning via IPv4 DHCP, when joining a group as a group client.
Value: 0
GROUP_CLIENT_IP_PROVISIONING_MODE_IPV6_LINK_LOCAL
static val GROUP_CLIENT_IP_PROVISIONING_MODE_IPV6_LINK_LOCAL: Int
IP provisioning via IPv6 link-local, when joining a group as a group client.
Value: 1
GROUP_OWNER_BAND_2GHZ
static val GROUP_OWNER_BAND_2GHZ: Int
Allow the system to pick the operating frequency from the 2.4 GHz band.
Value: 1
GROUP_OWNER_BAND_5GHZ
static val GROUP_OWNER_BAND_5GHZ: Int
Allow the system to pick the operating frequency from the 5 GHz band.
Value: 2
GROUP_OWNER_BAND_AUTO
static val GROUP_OWNER_BAND_AUTO: Int
Allow the system to pick the operating frequency from all supported bands.
Value: 0
GROUP_OWNER_INTENT_AUTO
static val GROUP_OWNER_INTENT_AUTO: Int
The system can choose an appropriate owner intent value, to be filled in the field groupOwnerIntent
.
Value: -1
GROUP_OWNER_INTENT_MAX
static val GROUP_OWNER_INTENT_MAX: Int
The most inclination to be a group owner, to be filled in the field groupOwnerIntent
.
Value: 15
GROUP_OWNER_INTENT_MIN
static val GROUP_OWNER_INTENT_MIN: Int
The least inclination to be a group owner, to be filled in the field groupOwnerIntent
.
Value: 0
Public constructors
Public methods
describeContents
open 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 |
getGroupClientIpProvisioningMode
open fun getGroupClientIpProvisioningMode(): Int
Get the IP provisioning mode when joining a group as a group client. The result will be one of the following: GROUP_CLIENT_IP_PROVISIONING_MODE_IPV4_DHCP
, GROUP_CLIENT_IP_PROVISIONING_MODE_IPV6_LINK_LOCAL
Return | |
---|---|
Int |
Value is android.net.wifi.p2p.WifiP2pConfig#GROUP_CLIENT_IP_PROVISIONING_MODE_IPV4_DHCP , or android.net.wifi.p2p.WifiP2pConfig#GROUP_CLIENT_IP_PROVISIONING_MODE_IPV6_LINK_LOCAL |
getGroupOwnerBand
open fun getGroupOwnerBand(): Int
Get the required band for the group owner. The result will be one of the following: GROUP_OWNER_BAND_AUTO
, GROUP_OWNER_BAND_2GHZ
, GROUP_OWNER_BAND_5GHZ
Return | |
---|---|
Int |
Value is android.net.wifi.p2p.WifiP2pConfig#GROUP_OWNER_BAND_AUTO , android.net.wifi.p2p.WifiP2pConfig#GROUP_OWNER_BAND_2GHZ , or android.net.wifi.p2p.WifiP2pConfig#GROUP_OWNER_BAND_5GHZ |
getNetworkId
open fun getNetworkId(): Int
Get the network ID of this P2P configuration.
Return | |
---|---|
Int |
either a non-negative network ID, or one of WifiP2pGroup#NETWORK_ID_PERSISTENT or WifiP2pGroup#NETWORK_ID_TEMPORARY . |
getNetworkName
open fun getNetworkName(): String?
Get the network name of this P2P configuration, or null if unset.
getPassphrase
open fun getPassphrase(): String?
Get the passphrase of this P2P configuration, or null if unset.
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Implement the Parcelable interface
Parameters | |
---|---|
dest |
Parcel: The Parcel in which the object should be written. 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<WifiP2pConfig!>
Implement the Parcelable interface
deviceAddress
var deviceAddress: String!
The device MAC address uniquely identifies a Wi-Fi p2p device
groupOwnerIntent
var groupOwnerIntent: Int
This is an integer value between GROUP_OWNER_INTENT_MIN
and GROUP_OWNER_INTENT_MAX
where GROUP_OWNER_INTENT_MIN
indicates the least inclination to be a group owner and GROUP_OWNER_INTENT_MAX
indicates the highest inclination to be a group owner. A value of GROUP_OWNER_INTENT_AUTO
indicates the system can choose an appropriate value. By default this field is set to GROUP_OWNER_INTENT_AUTO
.
Value is between 0 and 15 inclusive