AdvertisingOptions

public final classAdvertisingOptionsextendsObject
implementsParcelable

Nested Class Summary

class AdvertisingOptions.Builder Builder class for AdvertisingOptions.

Inherited Constant Summary

Field Summary

public static finalCreator<AdvertisingOptions> CREATOR

Public Constructor Summary

AdvertisingOptions(Strategy strategy)
This constructor is deprecated. Use AdvertisingOptions.Builderinstead.

Public Method Summary

staticString
convertConnectionTypeToString(int connectionType)
Converts the ConnectionTypeto a string.
boolean
int
getConnectionType()
Returns the ConnectionTypewhich 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
String
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<AdvertisingOptions> CREATOR

Public Constructors

publicAdvertisingOptions(Strategy strategy)

This constructor is deprecated.
Use AdvertisingOptions.Builderinstead.

Public Methods

public staticStringconvertConnectionTypeToString(int connectionType)

Converts theConnectionType to a string.

public booleanequals(Objectother)

public intgetConnectionType()

Returns theConnectionType 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 booleangetDisruptiveUpgrade()

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 booleangetLowPower()

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.

publicStrategy getStrategy()

Gets the advertising strategy. The strategy used for advertising must match the strategy used inDiscoveryOptions.

public inthashCode()

publicStringtoString()

public voidwriteToParcel(Parceldest, int flags)