public class AdvertiseSettings
- Object
- AdvertiseSettings
Options for
BluetoothLE.startAdvertising. Fluent setters return
this for chaining.Constructors
public AdvertiseSettings() |
Methods
public AdvertiseSettings setMode(AdvertiseMode mode) | The advertising-interval trade-off; defaults to AdvertiseMode.BALANCED. |
public AdvertiseSettings setTxPower(TxPowerLevel level) | The transmit power; defaults to TxPowerLevel.MEDIUM. |
public AdvertiseSettings setConnectable(boolean connectable) | Whether centrals may connect (the default) or the advertisement is broadcast-only (beacons). |
public AdvertiseSettings setTimeout(int millis) | Stops advertising automatically after the given number of milliseconds; 0 (the default) advertises until BleAdvertisement.stop(). |
public AdvertiseMode getMode() | The configured advertise mode. |
public TxPowerLevel getTxPower() | The configured transmit power. |
public boolean isConnectable() | Whether the advertisement accepts connections. |
public int getTimeout() | The configured timeout in milliseconds; 0 means until stopped. |
Inherited methods
Constructor details
AdvertiseSettings
public AdvertiseSettings()Method details
setMode
public AdvertiseSettings setMode(AdvertiseMode mode)The advertising-interval trade-off; defaults to
AdvertiseMode.BALANCED.setTxPower
public AdvertiseSettings setTxPower(TxPowerLevel level)The transmit power; defaults to
TxPowerLevel.MEDIUM.setConnectable
public AdvertiseSettings setConnectable(boolean connectable)Whether centrals may connect (the default) or the advertisement is
broadcast-only (beacons).
setTimeout
public AdvertiseSettings setTimeout(int millis)Stops advertising automatically after the given number of
milliseconds;
0 (the default) advertises until
BleAdvertisement.stop().getMode
public AdvertiseMode getMode()The configured advertise mode.
getTxPower
public TxPowerLevel getTxPower()The configured transmit power.
isConnectable
public boolean isConnectable()Whether the advertisement accepts connections.
getTimeout
public int getTimeout()The configured timeout in milliseconds;
0 means until stopped.