Class AdvertiseSettings
java.lang.Object
com.codename1.bluetooth.le.server.AdvertiseSettings
Options for
BluetoothLE.startAdvertising. Fluent setters return
this for chaining.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMode()The configured advertise mode.intThe configured timeout in milliseconds;0means until stopped.The configured transmit power.booleanWhether the advertisement accepts connections.setConnectable(boolean connectable) Whether centrals may connect (the default) or the advertisement is broadcast-only (beacons).setMode(AdvertiseMode mode) The advertising-interval trade-off; defaults toAdvertiseMode.BALANCED.setTimeout(int millis) Stops advertising automatically after the given number of milliseconds;0(the default) advertises untilBleAdvertisement.stop().setTxPower(TxPowerLevel level) The transmit power; defaults toTxPowerLevel.MEDIUM.
-
Constructor Details
-
AdvertiseSettings
public AdvertiseSettings()
-
-
Method Details
-
setMode
The advertising-interval trade-off; defaults toAdvertiseMode.BALANCED. -
setTxPower
The transmit power; defaults toTxPowerLevel.MEDIUM. -
setConnectable
Whether centrals may connect (the default) or the advertisement is broadcast-only (beacons). -
setTimeout
Stops advertising automatically after the given number of milliseconds;0(the default) advertises untilBleAdvertisement.stop(). -
getMode
The configured advertise mode. -
getTxPower
The configured transmit power. -
isConnectable
public boolean isConnectable()Whether the advertisement accepts connections. -
getTimeout
public int getTimeout()The configured timeout in milliseconds;0means until stopped.
-