BleAdvertisingSettings

data class BleAdvertisingSettings(val txPowerLevel: BleTxPowerLevel? = null, val includeTxPower: Boolean? = null, val interval: BleAdvertisingInterval? = null, val connectable: Boolean = true, val timeout: Int = 0, val deviceName: String? = null, val anonymous: Boolean? = null, val legacyMode: Boolean = false, val primaryPhy: BleGattPrimaryPhy? = null, val secondaryPhy: BleGattPhy? = null, val scannable: Boolean? = false)

The class provide a way to adjust advertising preferences for each Bluetooth LE advertisement instance.

See also

(https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings)

Constructors

Link copied to clipboard
constructor(txPowerLevel: BleTxPowerLevel? = null, includeTxPower: Boolean? = null, interval: BleAdvertisingInterval? = null, connectable: Boolean = true, timeout: Int = 0, deviceName: String? = null, anonymous: Boolean? = null, legacyMode: Boolean = false, primaryPhy: BleGattPrimaryPhy? = null, secondaryPhy: BleGattPhy? = null, scannable: Boolean? = false)

Properties

Link copied to clipboard
@RequiresApi(value = 26)
val anonymous: Boolean? = null

Whether the advertisement will be anonymous.

Link copied to clipboard
val connectable: Boolean = true

Whether the advertisement will be connectable.

Link copied to clipboard
@RequiresApi(value = 26)
val deviceName: String? = null

The advertising display name.

Link copied to clipboard
val includeTxPower: Boolean? = null

Whether the TX Power will be included.

Link copied to clipboard

The advertising interval (BleAdvertisingInterval).

Link copied to clipboard
@RequiresApi(value = 26)
val legacyMode: Boolean = false

Whether the legacy advertisement will be used.

Link copied to clipboard
@RequiresApi(value = 26)
val primaryPhy: BleGattPrimaryPhy? = null

The primary advertising phy (BleGattPrimaryPhy).

Link copied to clipboard
@RequiresApi(value = 26)
val scannable: Boolean? = false

Whether the advertisement will be scannable.

Link copied to clipboard
@RequiresApi(value = 26)
val secondaryPhy: BleGattPhy? = null

The secondary advertising phy (BleGattPhy).

Link copied to clipboard
val timeout: Int = 0

The advertising time limit in milliseconds.

Link copied to clipboard

The TX power level (BleTxPowerLevel) for advertising.