| java.lang.Object | |
| ↳ | android.bluetooth.le.AdvertiseSettings.Builder |
Builder class for AdvertiseSettings.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Build the
AdvertiseSettings object.
| |||||||||||
Set advertise mode to control the advertising power and latency.
| |||||||||||
Set whether the advertisement type should be connectable or non-connectable.
| |||||||||||
Limit advertising to a given amount of time.
| |||||||||||
Set advertise TX power level to control the transmission power level for the advertising.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Set advertise mode to control the advertising power and latency.
| advertiseMode | Bluetooth LE Advertising mode, can only be one of
ADVERTISE_MODE_LOW_POWER,
ADVERTISE_MODE_BALANCED, or
ADVERTISE_MODE_LOW_LATENCY. |
|---|
| IllegalArgumentException | If the advertiseMode is invalid. |
|---|
Set whether the advertisement type should be connectable or non-connectable.
| connectable | Controls whether the advertisment type will be connectable (true) or non-connectable (false). |
|---|
Limit advertising to a given amount of time.
| timeoutMillis | Advertising time limit. May not exceed 180000 milliseconds. A value of 0 will disable the time limit. |
|---|
| IllegalArgumentException | If the provided timeout is over 180000 ms. |
|---|
Set advertise TX power level to control the transmission power level for the advertising.
| txPowerLevel | Transmission power of Bluetooth LE Advertising, can only be one of
ADVERTISE_TX_POWER_ULTRA_LOW,
ADVERTISE_TX_POWER_LOW,
ADVERTISE_TX_POWER_MEDIUM or
ADVERTISE_TX_POWER_HIGH. |
|---|
| IllegalArgumentException | If the txPowerLevel is invalid.
|
|---|