WifiP2pDiscoveryConfig.Builder
public
static
final
class
WifiP2pDiscoveryConfig.Builder
extends Object
java.lang.Object | |
↳ | android.net.wifi.p2p.WifiP2pDiscoveryConfig.Builder |
Builder for WifiP2pDiscoveryConfig
.
Summary
Public constructors | |
---|---|
Builder(int scanType)
Constructor for |
Public methods | |
---|---|
WifiP2pDiscoveryConfig
|
build()
Build |
WifiP2pDiscoveryConfig.Builder
|
setFrequencyMhz(int frequencyMhz)
Set the frequency to scan. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (int scanType)
Constructor for Builder
.
Parameters | |
---|---|
scanType |
int : Type of this P2P scan.
Value is WifiP2pManager.WIFI_P2P_SCAN_FULL , WifiP2pManager.WIFI_P2P_SCAN_SOCIAL , or WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ |
Public methods
build
public WifiP2pDiscoveryConfig build ()
Build WifiP2pDiscoveryConfig
given the current requests made on the builder.
Returns | |
---|---|
WifiP2pDiscoveryConfig |
WifiP2pDiscoveryConfig constructed based on builder method calls.
This value cannot be null . |
setFrequencyMhz
public WifiP2pDiscoveryConfig.Builder setFrequencyMhz (int frequencyMhz)
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 |
Returns | |
---|---|
WifiP2pDiscoveryConfig.Builder |
Builder for chaining.
This value cannot be null . |