Added in API level 29

WifiAwareNetworkSpecifier


class WifiAwareNetworkSpecifier : NetworkSpecifier, Parcelable
kotlin.Any
   ↳ android.net.NetworkSpecifier
   ↳ android.net.wifi.aware.WifiAwareNetworkSpecifier

Network specifier object used to request a Wi-Fi Aware network. Apps should use the WifiAwareNetworkSpecifier.Builder class to create an instance.

Summary

Nested classes

A builder class for a Wi-Fi Aware network specifier to set up an Aware connection with a peer.

Inherited constants
Public methods
Int

Int

Get the specified channel in MHZ for this Wi-Fi Aware network specifier.

WifiAwareDataPathSecurityConfig?

Get the security config specified in this Network Specifier to encrypt Wi-Fi Aware data-path

Boolean

Check if the specified channel is required to honor or not.

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<WifiAwareNetworkSpecifier!>

Public methods

describeContents

Added in API level 29
fun describeContents(): Int
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

getChannelFrequencyMhz

Added in API level 33
fun getChannelFrequencyMhz(): Int

Get the specified channel in MHZ for this Wi-Fi Aware network specifier.

Return
Int Channel frequency in Mhz. A value of 0 indicates that no channel was specified. Value is 0 or greater

getWifiAwareDataPathSecurityConfig

Added in API level 33
fun getWifiAwareDataPathSecurityConfig(): WifiAwareDataPathSecurityConfig?

Get the security config specified in this Network Specifier to encrypt Wi-Fi Aware data-path

Return
WifiAwareDataPathSecurityConfig? WifiAwareDataPathSecurityConfig used to encrypt the data-path This value may be null.

isChannelRequired

Added in API level 33
fun isChannelRequired(): Boolean

Check if the specified channel is required to honor or not.

Return
Boolean true if forced to honer, false for recommend to use.

writeToParcel

Added in API level 29
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
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

Added in API level 29
static val CREATOR: Parcelable.Creator<WifiAwareNetworkSpecifier!>