Added in API level 35
Builder
class Builder
kotlin.Any | |
↳ | android.net.wifi.p2p.WifiP2pDiscoveryConfig.Builder |
Builder for WifiP2pDiscoveryConfig
.
Summary
Public constructors | |
---|---|
Constructor for |
Public methods | |
---|---|
WifiP2pDiscoveryConfig |
build() Build |
WifiP2pDiscoveryConfig.Builder |
setFrequencyMhz(frequencyMhz: Int) Set the frequency to scan. |
Public constructors
Builder
Added in API level 35
Builder(scanType: Int)
Constructor for Builder
.
Parameters | |
---|---|
scanType |
Int: Type of this P2P scan. Value is android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_SCAN_FULL , android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_SCAN_SOCIAL , or android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ |
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 . |