# Class AdvertiseSettings

java.lang.Object
com.codename1.bluetooth.le.server.AdvertiseSettings

public class AdvertiseSettings extends Object
Options for `BluetoothLE.startAdvertising`. Fluent setters return `this` for chaining.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AdvertiseSettings()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AdvertiseMode`
  `getMode()`
  The configured advertise mode.
  `int`
  `getTimeout()`
  The configured timeout in milliseconds; `0` means until stopped.
  `TxPowerLevel`
  `getTxPower()`
  The configured transmit power.
  `boolean`
  `isConnectable()`
  Whether the advertisement accepts connections.
  `AdvertiseSettings`
  `setConnectable(boolean connectable)`
  Whether centrals may connect (the default) or the advertisement is broadcast-only (beacons).
  `AdvertiseSettings`
  `setMode(AdvertiseMode mode)`
  The advertising-interval trade-off; defaults to `AdvertiseMode.BALANCED`.
  `AdvertiseSettings`
  `setTimeout(int millis)`
  Stops advertising automatically after the given number of milliseconds; `0` (the default) advertises until `BleAdvertisement.stop()`.
  `AdvertiseSettings`
  `setTxPower(TxPowerLevel level)`
  The transmit power; defaults to `TxPowerLevel.MEDIUM`.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.