BluetoothLeAdvertiser
abstract class BluetoothLeAdvertiser(environment: AndroidEnvironment) : BluetoothLeAdvertiser<AdvertisingPayload>
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 AndroidEnvironment.deviceName property to get or set the device name (it will affect all applications).
Parameters
environment
The Android-specific environment to use for the advertiser.
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.