BluetoothLeAdvertiser

Base advertiser interface for Android.

This interface extends BluetoothLeAdvertiser and adds Android-specific methods. For example, it is not possible to set the local device name on Android. The name of the device is used, and user can only control whether it should be included in the advertising data.

Use name property to get or set the device name (it will affect all applications).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Factory

Properties

Link copied to clipboard
abstract var name: String?

The local Bluetooth adapter name, or null on error.

Link copied to clipboard

The local Bluetooth adapter name, or null on error.

Functions

Link copied to clipboard
open suspend override fun advertise(connectable: Boolean, payload: AdvertisingPayload, timeout: Duration, block: (txPower: Int) -> Unit?)

suspend fun advertise(parameters: AdvertisingSetParameters, payload: AdvertisingPayload, maxAdvertisingEvents: @Range(from = 1, to = 255) Int, block: (txPower: Int) -> Unit?)
suspend fun advertise(parameters: AdvertisingSetParameters, payload: AdvertisingPayload, timeout: Duration, block: (txPower: Int) -> Unit?)

Starts Bluetooth LE advertising using given parameters.

Link copied to clipboard

The maximum advertising data length supported by the Bluetooth adapter.