WifiP2pGroup
open class WifiP2pGroup : Parcelable
kotlin.Any | |
↳ | android.net.wifi.p2p.WifiP2pGroup |
A class representing a Wi-Fi P2p group. A p2p group consists of a single group owner and one or more clients. In the case of a group with only two devices, one will be the group owner and the other will be a group client. {@see WifiP2pManager}
Summary
Constants | |
---|---|
static Int |
The persistent network id. |
static Int |
The temporary network id. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
WifiP2pGroup(source: WifiP2pGroup!) copy constructor |
Public methods | |
---|---|
open Int |
Implement the Parcelable interface |
open MutableCollection<WifiP2pDevice!>! |
Get the list of clients currently part of the p2p group |
open Int |
Get the operating frequency (in MHz) of the p2p group |
open String! |
Get the interface name on which the group is created |
open Int |
The network ID of the P2P group in wpa_supplicant. |
open String! |
Get the network name (SSID) of the group. |
open WifiP2pDevice! |
getOwner() Get the details of the group owner as a |
open String! |
Get the passphrase of the group. |
open Boolean |
Check whether this device is the group owner of the created p2p group |
open String |
toString() |
open Unit |
writeToParcel(dest: Parcel, flags: Int) Implement the Parcelable interface |
Properties | |
---|---|
static Parcelable.Creator<WifiP2pGroup!> |
Implement the Parcelable interface |
Constants
NETWORK_ID_PERSISTENT
static val NETWORK_ID_PERSISTENT: Int
The persistent network id. If a matching persistent profile is found, use it. Otherwise, create a new persistent profile.
Value: -2
See Also
NETWORK_ID_TEMPORARY
static val NETWORK_ID_TEMPORARY: Int
The temporary network id.
Value: -1
See Also
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 |
getClientList
open fun getClientList(): MutableCollection<WifiP2pDevice!>!
Get the list of clients currently part of the p2p group
getFrequency
open fun getFrequency(): Int
Get the operating frequency (in MHz) of the p2p group
getInterface
open fun getInterface(): String!
Get the interface name on which the group is created
getNetworkId
open fun getNetworkId(): Int
The network ID of the P2P group in wpa_supplicant.
getNetworkName
open fun getNetworkName(): String!
Get the network name (SSID) of the group. Legacy Wi-Fi clients will discover the p2p group using the network name.
getOwner
open fun getOwner(): WifiP2pDevice!
Get the details of the group owner as a WifiP2pDevice
object
getPassphrase
open fun getPassphrase(): String!
Get the passphrase of the group. This function will return a valid passphrase only at the group owner. Legacy Wi-Fi clients will need this passphrase alongside network name obtained from getNetworkName()
to join the group
isGroupOwner
open fun isGroupOwner(): Boolean
Check whether this device is the group owner of the created p2p group
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<WifiP2pGroup!>
Implement the Parcelable interface