Added in API level 26

SubscribeConfig


class SubscribeConfig : Parcelable
kotlin.Any
   ↳ android.net.wifi.aware.SubscribeConfig

Defines the configuration of an Aware subscribe session. Built using SubscribeConfig.Builder. Subscribe is done using WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback, or SubscribeDiscoverySession#updateSubscribe(SubscribeConfig).

Summary

Nested classes

Builder used to build SubscribeConfig objects.

Constants
static Int

Defines an active subscribe session - a subscribe session where subscribe packets are transmitted over-the-air.

static Int

Defines a passive subscribe session - a subscribe session where subscribe packets are not transmitted over-the-air and the device listens and matches to transmitted publish packets.

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

Int

Check if enable instant mode on 5G for this subscribe session

AwarePairingConfig?

Get the Aware Pairing config for this subscribe session

Int

Boolean

Check if instant mode is enabled for this subscribe session.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<SubscribeConfig!>

Constants

SUBSCRIBE_TYPE_ACTIVE

Added in API level 26
static val SUBSCRIBE_TYPE_ACTIVE: Int

Defines an active subscribe session - a subscribe session where subscribe packets are transmitted over-the-air. Configuration is done using SubscribeConfig.Builder#setSubscribeType(int).

Value: 1

SUBSCRIBE_TYPE_PASSIVE

Added in API level 26
static val SUBSCRIBE_TYPE_PASSIVE: Int

Defines a passive subscribe session - a subscribe session where subscribe packets are not transmitted over-the-air and the device listens and matches to transmitted publish packets. Configuration is done using SubscribeConfig.Builder#setSubscribeType(int).

Value: 0

Public methods

describeContents

Added in API level 26
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

equals

Added in API level 26
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.

getInstantCommunicationBand

Added in API level 33
fun getInstantCommunicationBand(): Int

Check if enable instant mode on 5G for this subscribe session

Return
Int If instant communication mode is not enabled will return android.net.wifi.ScanResult#WIFI_BAND_24_GHZ as default. Value is android.net.wifi.ScanResult#WIFI_BAND_24_GHZ, or android.net.wifi.ScanResult#WIFI_BAND_5_GHZ

getPairingConfig

Added in API level 34
fun getPairingConfig(): AwarePairingConfig?

Get the Aware Pairing config for this subscribe session

Return
AwarePairingConfig? A AwarePairingConfig specified in this config. This value may be null.

hashCode

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

isInstantCommunicationModeEnabled

Added in API level 33
fun isInstantCommunicationModeEnabled(): Boolean

Check if instant mode is enabled for this subscribe session.

Return
Boolean true for enabled, false otherwise.

toString

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

writeToParcel

Added in API level 26
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 26
static val CREATOR: Parcelable.Creator<SubscribeConfig!>