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
Boolean

Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Boolean
equals(other: Any?)

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

Int

Boolean

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

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<WifiAwareNetworkSpecifier!>

Public methods

canBeSatisfiedBy

Added in API level 31
fun canBeSatisfiedBy(other: NetworkSpecifier!): Boolean

describeContents

Added in API level 29
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

equals

Added in API level 29
fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

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.

hashCode

Added in API level 29
fun hashCode(): Int
Return
Int a hash code value for this object.

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.

toString

Added in API level 29
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 29
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

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 the following:

Properties

CREATOR

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