Added in API level 26
Builder
class Builder
kotlin.Any | |
↳ | android.bluetooth.le.PeriodicAdvertisingParameters.Builder |
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
PeriodicAdvertisingParameters! |
build() Build the |
PeriodicAdvertisingParameters.Builder! |
setIncludeTxPower(includeTxPower: Boolean) Whether the transmission power level should be included in the periodic packet. |
PeriodicAdvertisingParameters.Builder! |
setInterval(interval: Int) Set advertising interval for periodic advertising, in 1. |
Public constructors
Public methods
build
Added in API level 26
fun build(): PeriodicAdvertisingParameters!
Build the AdvertisingSetParameters
object.
setIncludeTxPower
Added in API level 26
fun setIncludeTxPower(includeTxPower: Boolean): PeriodicAdvertisingParameters.Builder!
Whether the transmission power level should be included in the periodic packet.
setInterval
Added in API level 26
fun setInterval(interval: Int): PeriodicAdvertisingParameters.Builder!
Set advertising interval for periodic advertising, in 1.25ms unit. Valid values are from 80 (100ms) to 65519 (81.89875s). Value from range [interval, interval+20ms] will be picked as the actual value.
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
If the interval is invalid. |