AI-generated Key Takeaways
-
DiscoveryOptions.Builder is a builder class for DiscoveryOptions.
-
It provides constructors for creating a builder with default options or by copying existing options.
-
Public methods allow setting whether to use low power and setting the discovery strategy.
-
The build method creates a DiscoveryOptions object from the builder.
Builder class for DiscoveryOptions.
Public Constructor Summary
|
Builder()
Creates a builder using the default discovery options.
|
|
Public Method Summary
| DiscoveryOptions |
build()
|
| DiscoveryOptions.Builder |
setLowPower(boolean lowPower)
Sets whether to use low power.
|
| DiscoveryOptions.Builder |
Inherited Method Summary
Public Constructors
public Builder ()
Creates a builder using the default discovery options.
public Builder (DiscoveryOptions origin)
Creates a builder, copying the provided discovery options.
Public Methods
public DiscoveryOptions build ()
public DiscoveryOptions.Builder setLowPower (boolean lowPower)
Sets whether to use low power. If true, only low power mediums (like BLE) will be used for discovery. By default, this option is false.
public DiscoveryOptions.Builder setStrategy (Strategy strategy)
Sets the discovery strategy. Must match the strategy used in AdvertisingOptions.