Options for a call to
ConnectionsClient.startAdvertising(String, String, ConnectionLifecycleCallback,
AdvertisingOptions)
.
Nested Class Summary
class | AdvertisingOptions.Builder | Builder class for AdvertisingOptions. |
Inherited Constant Summary
Field Summary
public static final Creator<AdvertisingOptions> | CREATOR |
Public Constructor Summary
AdvertisingOptions(Strategy
strategy)
This constructor is deprecated. Use
AdvertisingOptions.Builder instead.
|
Public Method Summary
static String |
convertConnectionTypeToString(int connectionType)
Converts the
ConnectionType to a string.
|
boolean | |
int |
getConnectionType()
Returns the
ConnectionType which indicates the client's preference for whether
or not to disrupt the current Wi-Fi or Bluetooth connection.
|
boolean |
getDisruptiveUpgrade()
This method is deprecated. Use
getConnectionType() instead.
|
boolean |
getLowPower()
Gets whether low power should be used.
|
Strategy |
getStrategy()
Gets the advertising strategy.
|
int |
hashCode()
|
String |
toString()
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<AdvertisingOptions> CREATOR
Public Constructors
public AdvertisingOptions (Strategy strategy)
This constructor is deprecated.
Use
AdvertisingOptions.Builder
instead.
Public Methods
public static String convertConnectionTypeToString (int connectionType)
Converts the ConnectionType
to a string.
public boolean equals (Object other)
public int getConnectionType ()
Returns the ConnectionType
which indicates the client's preference for whether or not to disrupt the current Wi-Fi
or Bluetooth connection. The default is
ConnectionType.BALANCED
.
public boolean getDisruptiveUpgrade ()
This method is deprecated.
Use
getConnectionType()
instead.
Gets the disruptive upgrade flag. A disruptive upgrade may disconnect the device from its primary Wi-Fi network, or otherwise modify Wi-Fi and/or BT state to optimize for faster throughput. By default, this option is true.
public boolean getLowPower ()
Gets whether low power should be used. If true, only low power mediums (like BLE) will be used for advertising. By default, this option is false.
public Strategy getStrategy ()
Gets the advertising strategy. The strategy used for advertising must match the
strategy used in DiscoveryOptions
.