Page Summary
-
DiscoveryOptions are used for configuring the discovery process in the Nearby Connections API.
-
The DiscoveryOptions class includes a Builder for creating instances.
-
You can get the strategy and low power setting for discovery using methods in this class.
-
There is a deprecated constructor that should be avoided in favor of the Builder.
Options for a call to
ConnectionsClient.startDiscovery(String, EndpointDiscoveryCallback,
DiscoveryOptions).
Nested Class Summary
| class | DiscoveryOptions.Builder | Builder class for DiscoveryOptions. | |
Inherited Constant Summary
Field Summary
| public static final Creator<DiscoveryOptions> | CREATOR |
Public Constructor Summary
|
DiscoveryOptions(Strategy
strategy)
This constructor is deprecated. Use
DiscoveryOptions.Builder instead.
|
Public Method Summary
| boolean | |
| boolean |
getLowPower()
Gets whether low power should be used, if true, only low power mediums (like
BLE) will be used for discovery.
|
| Strategy |
getStrategy()
Gets the discovery strategy, the strategy to use for discovering, must match
the strategy used in
AdvertisingOptions.
|
| int |
hashCode()
|
| String |
toString()
|
| void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<DiscoveryOptions> CREATOR
Public Constructors
public DiscoveryOptions (Strategy strategy)
This constructor is deprecated.
Use
DiscoveryOptions.Builder instead.
Public Methods
public boolean equals (Object other)
public boolean getLowPower ()
Gets whether low power should be used, if true, only low power mediums (like BLE) will be used for discovery. By default, this option is false.
public Strategy getStrategy ()
Gets the discovery strategy, the strategy to use for discovering, must match the
strategy used in AdvertisingOptions.