Added in API level 35

Builder


class Builder
kotlin.Any
   ↳ android.net.wifi.p2p.WifiP2pDiscoveryConfig.Builder

Builder for WifiP2pDiscoveryConfig.

Summary

Public constructors
Builder(scanType: Int)

Constructor for Builder.

Public methods
WifiP2pDiscoveryConfig

Build WifiP2pDiscoveryConfig given the current requests made on the builder.

WifiP2pDiscoveryConfig.Builder
setFrequencyMhz(frequencyMhz: Int)

Set the frequency to scan.

Public constructors

Public methods

build

Added in API level 35
fun build(): WifiP2pDiscoveryConfig

Build WifiP2pDiscoveryConfig given the current requests made on the builder.

Return
WifiP2pDiscoveryConfig WifiP2pDiscoveryConfig constructed based on builder method calls. This value cannot be null.

setFrequencyMhz

Added in API level 35
fun setFrequencyMhz(frequencyMhz: Int): WifiP2pDiscoveryConfig.Builder

Set the frequency to scan. Only applicable if the scan type is WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ.

Parameters
frequencyMhz Int: Frequency to scan in MHz. Value is 0 or greater
Return
WifiP2pDiscoveryConfig.Builder Builder for chaining. This value cannot be null.