ConnectionOptions.Builder

public static final class ConnectionOptions.Builder extends Object

Builder class for ConnectionOptions.

Public Constructor Summary

Builder()
Creates a new ConnectionOptions builder.
Builder(ConnectionOptions origin)
Creates a new ConnectionOptions builder, copying the provided instance.

Public Method Summary

ConnectionOptions
build()
Builds an instance of ConnectionOptions.
ConnectionOptions.Builder
setDisruptiveUpgrade(boolean disruptiveUpgrade)
Sets the disruptive upgrade flag.
ConnectionOptions.Builder
setLowPower(boolean lowPower)
Sets whether to attempt to connect with the lowest possible power (like BLE) if true.

Inherited Method Summary

Public Constructors

public Builder ()

Creates a new ConnectionOptions builder.

public Builder (ConnectionOptions origin)

Creates a new ConnectionOptions builder, copying the provided instance.

Public Methods

public ConnectionOptions build ()

Builds an instance of ConnectionOptions.

public ConnectionOptions.Builder setDisruptiveUpgrade (boolean disruptiveUpgrade)

Sets 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. Set this option to false if the user needs to maintain an internet connection or if the Nearby connection is expected to persist in the background.

public ConnectionOptions.Builder setLowPower (boolean lowPower)

Sets whether to attempt to connect with the lowest possible power (like BLE) if true. By default, this option is false.