WifiP2pDiscoveryConfig


public final class WifiP2pDiscoveryConfig
extends Object implements Parcelable

java.lang.Object
   ↳ android.net.wifi.p2p.WifiP2pDiscoveryConfig


A class representing a Wi-Fi P2P scan configuration for setting up discovery.

Summary

Nested classes

class WifiP2pDiscoveryConfig.Builder

Builder for WifiP2pDiscoveryConfig

Inherited constants

Fields

public static final Creator<WifiP2pDiscoveryConfig> CREATOR

Implement the Parcelable interface

Public methods

int describeContents()

Implement the Parcelable interface

int getFrequencyMhz()

Get the frequency to scan in MHz.

int getScanType()

Get the type of this scan.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in API level 35
public static final Creator<WifiP2pDiscoveryConfig> CREATOR

Implement the Parcelable interface

Public methods

describeContents

Added in API level 35
public int describeContents ()

Implement the Parcelable interface

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

getFrequencyMhz

Added in API level 35
public int getFrequencyMhz ()

Get the frequency to scan in MHz. See Builder.setFrequencyMhz(int)

Returns
int

getScanType

Added in API level 35
public int getScanType ()

Get the type of this scan. See Builder.Builder(int)}

Returns
int Value is WifiP2pManager.WIFI_P2P_SCAN_FULL, WifiP2pManager.WIFI_P2P_SCAN_SOCIAL, or WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ

toString

Added in API level 35
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 35
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES