PreviewPeripheral
A preview implementation of Peripheral for Android.
This class is used to preview the UI in the Compose Preview.
Parameters
The coroutine scope. This can be set to rememberCoroutineScope()
.
The MAC address of the peripheral.
An optional name of the peripheral.
The type of the peripheral, defaults to PeripheralType.LE.
The signal strength of the peripheral in dBm.
The connection state of the peripheral.
The list of fake services discovered on the peripheral.
true
if the Android device has the bond information for the peripheral, that is, if the peripheral is bonded to the device. Defaults to false
.
Constructors
Properties
MAC address of the peripheral as String, alias for Peripheral.identifier.
The current connection parameters as StateFlow.
Returns whether the system has bond information associated with this peripheral.
The Bluetooth device type of the remote device.
Functions
Initiates bonding with the peripheral.
The maximum amount of data, in bytes, you can send to a characteristic in a single write operation.
Refreshes the cached GATT database associated with the peripheral and starts new service discovery automatically.
Removes the bond information associated with the peripheral.
Requests new connection parameters.
Requests the highest possible MTU (ATT_MTU_MAX).
Set the preferred connection PHY.
Initiates a reliable write transaction for a given characteristic.